Well, my answer is not just the summary of all the solutions, but it offers more than that.
Section (1):
In general solutions:
I had four errors of this kind (‘metadata file could not be found’) along with one error saying ‘Source File Could Not Be Opened (‘Unspecified error ‘)’.
I tried to get rid of ‘metadata file could not be found’ error. For that, I read many posts, blogs, etc. and found these solutions may be effective (summarizing them over here):
-
Restart Visual Studio and try building again.
-
Go to ‘Solution Explorer’. Right click on Solution. Go to Properties. Go to ‘Configuration Manager’. Check if the checkboxes under ‘Build’ are checked or not. If any or all of them are unchecked, then check them and try building again.
-
If the above solution(s) do not work, then follow sequence mentioned in step 2 above, and even if all the checkboxes are checked, uncheck them, check again and try to build again.
-
Build Order and Project Dependencies:
Go to ‘Solution Explorer’. Right click on Solution. Go to ‘Project Dependencies…’. You will see two tabs: ‘Dependencies’ and ‘Build Order’. This build order is the one in which solution builds. Check the project dependencies and the build order to verify if some project (say ‘project1’) which is dependent on other (say ‘project2’) is trying to build before that one (project2). This might be the cause for the error.
-
Check the path of the missing .dll:
Check the path of the missing .dll. If the path contains space or any other invalid path character, remove it and try building again.
If this is the cause, then adjust the build order.
Section (2):
My particular case:
I tried all the steps above with various permutations and combinations with restarting Visual Studio a few times. But, it did not help me.
So, I decided to get rid of other error I was coming across (‘Source File Could Not Be Opened (‘Unspecified error ‘)’).
I came across a blog post: TFS Error–Source File Could Not Be Opened (‘Unspecified error ‘)
I tried the steps mentioned in that blog post, and I got rid of the error ‘Source File Could Not Be Opened (‘Unspecified error ‘)’ and surprisingly I got rid of other errors (‘metadata file could not be found’) as well.
Section (3):
Moral of the story:
Try all solutions as mentioned in section (1) above (and any other solutions) for getting rid of the error. If nothing works out, as per the blog mentioned in section (2) above, delete the entries of all source files which are no longer present in the source control and the file system from your .csproj file.
- Remove From My Forums
-
Question
-
Hi,
When I compile my C# project i am getting the below errors:
Error 1.
Error CS0006
Metadata file ‘E:CodeEMREMRCSDebugUIControl.dll’ could not be found EMRCS
E:CodeEMREMRCSCSC 1
ActiveError 2.
Error CS0006
Metadata file ‘E:CodeEMRUIControlEnergyUsageManagerbinDebugEnergyUsageManager.dll’ could not be found
EMRCS E:CodeEMREMRCSCSC
1 ActiveError 3.
Error CS0006
Metadata file ‘E:CodeEMRUIControlEMRLoggerbinDebugEMRLogger.dll’ could not be found
EMRCS E:CodeEMREMRCSCSC
1 ActiveError 4.
Error CS0006
Metadata file ‘E:CodeEMRUIControlWebserverRequestbinDebugWebserverRequest.dll’ could not be found
EMRCS E:CodeEMREMRCSCSC
1 ActiveFor Your Information,
For Error 1, In the below path of the project «UIControl.dll» is not there
E:CodeEMREMRCSbinDebugAnd also i verified that «build» checkbox is checked from Solution ->Configuration Properties
Please help me the root cause of these errors.
Regards,
Satya
Answers
-
Hi Satya,
Make sure that the «build» check box is marked in the following location:
1. Right click on the solution and click Properties.
2. Click Configuration on the left.
3. Make sure the check box under «Build» for the project is checked. If check then uncheck and check again and save the settings.
4. Clean the solution by right clicking on the project solution and rebuild the project again.
5. Make sure you don’t have any other error messages in your project and if you do, fix those first!
Thanks,
Sabah Shariq[If a post helps to resolve your issue, please click the
«Mark as Answer» of that post or click
«Vote as helpful» button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]-
Proposed as answer by
Thursday, September 6, 2018 8:27 AM
-
Marked as answer by
Satyaprakash A
Friday, September 7, 2018 4:48 PM
-
Proposed as answer by
Error 1 Metadata file
Severity Code Project Description File Line Suppression State
Error CS0006 MalaShree Metadata file ‘E:ProjectProviderbinDebugnet5.0refProvider.dll’ could not be found E:ProjectSchoolCSC 1 Active
Severity Code Project Description File Line Suppression State
Warning MSB3277 Provider (ProviderProvider) Found conflicts between different versions of «Microsoft.AspNetCore.Http.Features» that could not be resolved.
Answer
Option 1.
You just had the same problem. Visual Studio isn’t building the project that’s being referenced.
Do Step by Step like as given below.
- Right click on the solution and click Properties.
- Click Configuration on the left.
- Make sure the check box under «Build» for the project it can’t find is checked. If it is already checked, uncheck, hit apply and check the boxes again
- (Optional) You had to do it for both Release and Debug modes on the solution properties.
Option 2.
Close your Visual Studio and delete the .suo file that is next to the .sln file. (It will be re-generated the next time you Save all (or exit Visual Studio)).
Option 3.
You must manually build the dll project by right clicking on your solution and click on build solution.
Targeting a slightly different version of .NET and this was flagged as a warning by the compiler, but it was causing building to fail. This should have been flagged as an error and not a warning.
Option 4.
In the Visual Studio 2019 this is also working fine like as given below step.
- Close Visual Studio
- Delete the hidden .vs folder
- Reopen Visual Studio and rebuild the solution.
Option 5.
install-package entityframework -version 6.0.0.0
The error was still showing like as given above , so that those references were there because there was an older version of Entity Framework supposedly «preinstalled» on the project, but it was not really working.
The file packages.config and noticed that there was another reference:
<packages>
**<package id="EntityFramework" version="5.0.0" targetFramework="net45" />**
<package id="EntityFramework" version="6.0.0" targetFramework="net45" />
</packages>
After that deleted the line, cleaned and rebuild the project and the container solution, and it finally worked.
Option 6.
If your solution path is something like «My Project%2c Very Popular%2c Unit Testing%2c Software and Hardware.zip», it cannot resolve the metadata file, perhaps we should prevent some invalid words like %2c.
Option 7.
In some case this is working fine in VS2019 .Net Core,.net 5, ASP.Net Core solution.
- Open a PowerShell console in the same location of the solution.
- Type dotnet restore to restore al packages and projects
- Type dotnet build. The solution will be built
Related information
Sundar Neupane
I like working on projects with a team that cares about creating beautiful and usable interfaces.
If findandsolve.com felt valuable to you, feel free to share it.
Содержание
- Csc error cs0006 metadata file
- Answered by:
- Question
- Csc error cs0006 metadata file
- Answered by:
- Question
- CS0006: CSC(0,0): Metadata file ‘C:Windowssystem32configsystemprofile.nugetpackages. » could not be found #6027
- Comments
- Details about Problem
- Detailed repro steps so we can see the same problem
- Verbose Logs
- Error CS0006 Metadata file .dll could not be found (Solved)
- Csc error cs0006 metadata file
- Answered by:
- Question
- Answers
- All replies
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
When I compile my C# project i am getting the below errors:
Error CS0006 Metadata file ‘E:CodeEMREMRCSDebugUIControl.dll’ could not be found EMRCS E:CodeEMREMRCSCSC 1 Active
Error 2.
Error CS0006 Metadata file ‘E:CodeEMRUIControlEnergyUsageManagerbinDebugEnergyUsageManager.dll’ could not be found EMRCS E:CodeEMREMRCSCSC 1 Active
Error 3.
Error CS0006 Metadata file ‘E:CodeEMRUIControlEMRLoggerbinDebugEMRLogger.dll’ could not be found EMRCS E:CodeEMREMRCSCSC 1 Active
Error 4.
Error CS0006 Metadata file ‘E:CodeEMRUIControlWebserverRequestbinDebugWebserverRequest.dll’ could not be found EMRCS E:CodeEMREMRCSCSC 1 Active
For Your Information,
For Error 1, In the below path of the project «UIControl.dll» is not there
E:CodeEMREMRCSbinDebug
And also i verified that «build» checkbox is checked from Solution ->Configuration Properties
Please help me the root cause of these errors.
Источник
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
When I compile my C# project i am getting the below errors:
Error CS0006 Metadata file ‘E:CodeEMREMRCSDebugUIControl.dll’ could not be found EMRCS E:CodeEMREMRCSCSC 1 Active
Error 2.
Error CS0006 Metadata file ‘E:CodeEMRUIControlEnergyUsageManagerbinDebugEnergyUsageManager.dll’ could not be found EMRCS E:CodeEMREMRCSCSC 1 Active
Error 3.
Error CS0006 Metadata file ‘E:CodeEMRUIControlEMRLoggerbinDebugEMRLogger.dll’ could not be found EMRCS E:CodeEMREMRCSCSC 1 Active
Error 4.
Error CS0006 Metadata file ‘E:CodeEMRUIControlWebserverRequestbinDebugWebserverRequest.dll’ could not be found EMRCS E:CodeEMREMRCSCSC 1 Active
For Your Information,
For Error 1, In the below path of the project «UIControl.dll» is not there
E:CodeEMREMRCSbinDebug
And also i verified that «build» checkbox is checked from Solution ->Configuration Properties
Please help me the root cause of these errors.
Источник
Details about Problem
Running .NET Core SDK 2.0.2, .NET Framework 4.6.2 and the VS 2017 Build Tools for v 15.4.
Running from within TeamCity I’m intermittently getting build failures like this:
CS0006: CSC(0,0): Metadata file ‘C:Windowssystem32configsystemprofile.nugetpackages. XX.dll» could not be found
with no indication as to why this is
Detailed repro steps so we can see the same problem
Install dependencies so:
dotnet-sdk-2.0.2-win-x64.exe /install /quiet /norestart /log «C:WindowsTempdotnet-sdk-2.0.2-win-x64.log»»
vs_buildtools.exe —add Microsoft.VisualStudio.Workload.NetCoreBuildTools —add Microsoft.VisualStudio.Workload.MSBuildTools —add Microsoft.VisualStudio.Workload.WebBuildTools —passive —norestart
Project file looks like this:
C:Program Files (x86)Microsoft Visual Studio2017BuildToolsMSBuild15.0BinMSBuild.exe ./src/XX.sln /t:Restore;Build /m /nodeReuse:False /tv:15.0 /v:diag /p:RestorePackages=»True» /p:Optimize=»True» /p:DebugSymbols=»True» /p:TreatWarningsAsErrors=»True» /p:Configuration=»Release» /logger:Fake.MsBuildLogger+TeamCityLogger,»C:BuildAgentwork9703509c24d73488packagesbuildFAKE.x64toolsFakeLib.dll» /logger:Fake.MsBuildLogger+ErrorLogger,»C:BuildAgentwork9703509c24d73488packagesbuildFAKE.x64toolsFakeLib.dll»
Verbose Logs
Verbose msbuild logs
The text was updated successfully, but these errors were encountered:
Источник
I faced this error and it’s quite complicate to solve so I’m writing a post just to keep note and hopefully to provide some support to some other developers.
I spent a lot of time around this error and there are many reasons, ways and different scenarios because this error.
I had a look in internet and I tried any explicable and inexplicable workaround I found in Stackoverflow.
In my opinion is a common cause created by different things which are;
- different .net version used by some of the libraries, sometime we inadvertently change that.
- dependency breakdown in Visual studio, in that case we are able to build using MSBUILD but we can’t build using Visual Studio UI.
- Nuget package not updated in one of the referenced libraries.
- Project file with different configuration.
Quickest way to fix this issue is following some main steps:
- Fix the target framework, if you have few projects then is fine but if you have 70 projects or more then could be a problem so,
download the Target Framework Migrator and in one click align all the target framework in all project, this is a great tool to do that. - Fix nugget, enter in the nugget console
and execute Nuget restore SolutionName.sln
- Align and check the build configuration, right click on the solution and select properties.
Select configuration properties and check that all the projects are using the same configuration.
Check that all proper projects have the build checkbox selected.
Some external project like WIX or SQL or others could have the build checkbox selected, if this is the case then check that the specific project builds correctly or uncheck the box and apply. - Unload all the project from the solution and start loading each project starting from the base library.
Every time you reload one then rebuild the solution.
At the end of this procedure the problem should be definitely solved.
Источник
Answered by:
Question
Yesterday, I am trying to setup team build 2008 to run .net 4.0 application. I followed steps as posted at http://blogs.msdn.com/b/willbar/archive/2009/11/01/building-net-4-0-applications-using-team-build-2008.aspx
After restart build service my exisitng 3.5 solutions are failed to build with CSC : error CS0006: Metadata file . could not be found [. csproj].
I am seeing problem if the solution having multiple referenced projects. ex : Project A is my actual project which refers Project B and C.
If I revert back msbuild path in %ProgramFiles%Microsoft Visual Studio 9.0Common7IDEPrivateAssembliesTFSBuildService.exe.config then its able to build my 3.5 projects but my actual purpose building 4.0 application is failing.
Can you help me. I want
Answers
I think this issue is related to the Build Order.
1 Check the Configuration of the Build Definition(such as Release | Any CPU)
2 In the solution configuration manager, make sure that All Projects will be built correctly under the configuration
Best regards,
Ruiz
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg @ microsoft.com
- Marked as answer by Ruiz Yi Moderator Monday, August 30, 2010 6:25 AM
I did not encounter this issue in my TFS2008(with MSBuild4.0).
1 Are Project A,B and C in the same solution?
2 What the kind of these project? Winform, Class Library or others?
3 Does all these Projects Target .NET 4.0?
4 Could you verify whether Project B and C are compiled before ProjectA in the BuildLog?
Could you check that all projects are configured to be built in Configuration Manager?
5 Could you try build the solution with MSBuild4.0 manually?
5.1 Log on Build Server as the account TFSBuild
5.2 Run VS2010 to build the solution, will it success?
5.3 Run MSBuild 4.0 to build the solution, will it success?
Best regards,
Ruiz
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg @ microsoft.com
I also have this issue after upgrading TFS to 2010 (and the Team Build service)
The solutions are still developed in VS 2008 and I try to make the Team Build work.
CSC the metadata file . dll could not be found.
When I looked at the Team Build log I realized that MSBuild built projects not in the dependancy-order..
So if I have projA that references projB and projB references to projC, it builds projA first and failed because it does not find projB.dll.
I need a workaround for that.
I think this issue is related to the Build Order.
1 Check the Configuration of the Build Definition(such as Release | Any CPU)
2 In the solution configuration manager, make sure that All Projects will be built correctly under the configuration
Best regards,
Ruiz
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg @ microsoft.com
- Marked as answer by Ruiz Yi Moderator Monday, August 30, 2010 6:25 AM
I have tried everything!
Delete EDMX file
Played with Version of Framework from 3.5 to 4 = Same
Got the same version of the site in two places. i had the same issue in tne new one, but by magic the next day it was working OK with no intervention about changing or deleting anything. The second site is working Excellent, creates what is it supposed to but the old website comes up with issues like
Error 1 The type ‘XXX.Model.ListYYYYY’ already contains a definition for ‘authorizationZZZZ’ C:-windows pathADMEntities.Designer.cs 2697 45 XXX.Mode
Error 2 Metadata file ‘C:windows pathXXX.ModelbinDebugXXX.Model.dll’ could not be found C:-windows pathXXX.WebCSC XXX.Web
Have update de model on EF
Have unticked save and rebuild with a clean BUILD and ticked it back on = KO
It is impossible to find a straight answer to this issue in any ASP, C# or VS official forum.
Yes there are two ‘authorizationZZZZ’ classes declared but the one is global and the other is partial.
Источник
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; using System.Diagnostics; using System.Runtime.InteropServices; using System.IO; using Microsoft.Win32; namespace CPlan.W3LF { /// <summary> /// The wrapper around W3L. /// </summary> public static class Loader { #region API /// <summary> /// The call that is made to W3L.dll. /// </summary> /// <param name="CommandLine">Command line arguments. <remarks>Add the full execution path in quotation.</remarks></param> /// <param name="ExePath">The path to war3.exe.</param> /// <param name="ErrorMsg">Any error message that occured while patching/loading war3.exe.</param> /// <returns>A code about how the library has handled the call.</returns> [DllImport("w3l.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] static extern int DoInject(string CommandLine, string ExePath, [Out] out string ErrorMsg); // UNDONE: Changed the size of the API definition. //static extern Int32 DoInject( // [MarshalAs(UnmanagedType.LPStr)] string CommandLine, // [MarshalAs(UnmanagedType.LPStr)] string ExePath, // [Out][MarshalAs(UnmanagedType.LPStr)] out string ErrorMsg // ); #endregion /// <summary> /// A list of Warcraft III startup options. /// </summary> [Flags] public enum StartOptions : byte { /// <summary> /// No special arguments. /// </summary> None = 0, /// <summary> /// Starts Warcraft III in windowed mode. /// </summary> Window = 1, /// <summary> /// Starts Warcraft III with OpenGL. /// </summary> OpenGl = 2, /// <summary> /// Starts Warcraft III with Software Transform and Lighting Video mode /// </summary> SWTNL = 4, /// <summary> /// Starts classic Warcraft III. /// </summary> Classic = 8 } /// <summary> /// List for the registry check. /// </summary> private static List<Gateway> gateways = new List<Gateway>() { new Gateway(new Uri("server.eurobattle.net"), 8, "Eurobattle.Net"), new Gateway(new Uri("localhost"), 8, "Eurobattle.Net GProxy") }; /// <summary> /// Attempts to start Warcraft III (and GProxy.) /// </summary> /// <returns>True if call(s) has/have succeeded; else false.</returns> #if XPAM /// <param name="RunGP">Determine whether or not to check data for GProxy as well.</param> public static bool RunW3(bool RunGP) #else public static bool RunW3() #endif { try { // Check if war3.exe and w3lh.dll exist. try { if (!File.Exists(Path.Combine(Settings.W3Path, "war3.exe"))) { MessageBox.Show("The given directory does not contain war3.exe, please make sure your registry contains the right information.rnrnPath: " + Settings.W3Path, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; } if (!File.Exists(Path.Combine(Settings.W3Path + "w3lh.dll"))) { if (File.Exists(Path.Combine(Environment.CurrentDirectory + "w3lh.dll"))) { File.Copy(Path.Combine(Environment.CurrentDirectory + "w3lh.dll"), Path.Combine(Settings.W3Path + "w3lh.dll")); } else { MessageBox.Show("w3lh.dll copy in the directory "" + Environment.CurrentDirectory + "\w3lh.dll" does not exist.rnPlease reinstall EuroLoader.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; } } } catch (UnauthorizedAccessException) { MessageBox.Show("The application does not have the rights to either read or write to the source/destination directory.", "Error", MessageBoxButtons.OK); return false; } catch (FileNotFoundException) { MessageBox.Show("w3lh.dll was not found, please reinstall the application.", "Error", MessageBoxButtons.OK); return false; } catch (Exception ex) { MessageBox.Show("An unhandled exception was thrown.rnrn" + ex.Message, "Error", MessageBoxButtons.OK); return false; } // Checks the registry for a server.eurobattle.net entry. List<string> Entries = new List<string>((string[])Registry.CurrentUser.OpenSubKey("Software\Blizzard Entertainment\Warcraft III").GetValue("Battle.net Gateways")); //int count = (Entries.Count - 2) / 3; int server = 0; bool hasServer = false; for (int i = 2; i < Entries.Count; i += 3) { if (!hasServer) ++server; foreach (Gateway gw in gateways) { if (Entries[i].Equals(gw.Hostname.ToString()) || Entries[i + 2].Equals(gw.Name)) { if (!Entries[i].Equals(gw.Hostname.ToString())) Entries[i + 1] = gw.Hostname.ToString(); if (!Entries[i + 1].Equals(gw.TimeZone)) Entries[i + 1] = gw.TimeZone.ToString(); if (!Entries[i + 2].Equals(gw.Name)) Entries[i + 1] = gw.Name; hasServer = true; } } } Entries[1] = (server.ToString().Length == 2 ? server.ToString() : "0" + server.ToString()); Registry.CurrentUser.OpenSubKey("Software\Blizzard Entertainment\Warcraft III", true).SetValue("Battle.net Gateways", Entries.ToArray(), RegistryValueKind.MultiString); // Checks for the given arguments. StartOptions StartOption = Settings.StartupOptions; string Args = ""; if ((StartOption & StartOptions.Window) == StartOptions.Window) Args += " -window "; if ((StartOption & StartOptions.OpenGl) == StartOptions.OpenGl) Args += " -opengl "; if ((StartOption & StartOptions.SWTNL) == StartOptions.SWTNL) Args += " -swtnl "; if ((StartOption & StartOptions.Classic) == StartOptions.Classic) Args += " -classic "; string Msg; /* * Why Settings.W3Path + "\war3.exe": * The command line will not accept one argument. * Structure: * <Path of the to-execute application> [arguments] * If you do: * -window * Windows/Warcraft III will think you're starting up -window with no arguments. * Therefore you must have at least two arguments. */ switch (DoInject('"' + Path.Combine(Settings.W3Path, "war3.exe") + '"' + Args, Path.Combine(Settings.W3Path, "war3.exe"), out Msg)) { case 0: if (Msg != null) MessageBox.Show(Msg, "Startup message"); return true; // No error. case 2: MessageBox.Show("Unable to find war3.exe inrn" + Msg, "Error", MessageBoxButtons.OK); return false; case 1: default: MessageBox.Show(Msg, "Error", MessageBoxButtons.OK); return false; } } catch (AccessViolationException) { MessageBox.Show("An exception was thrown: Access Violation.", "Error", MessageBoxButtons.OK); return false; } catch (DllNotFoundException) { MessageBox.Show("Loader was unable to find w3l.dll.rnReinstalling the application could solve the issue.", "Error", MessageBoxButtons.OK); return false; } catch (Exception ex) { MessageBox.Show("An exception was thrown:rnrn" + ex.Message, "Error", MessageBoxButtons.OK); return false; } } } } |
Severity Code Description Project File Line Suppression State
Error CS0006 Metadata file ‘C:Usersuser1SourceReposPartsUnlimitedsrcPartsUnlimitedWebsitebinDebugnetcoreapp2.0PartsUnlimitedWebsite.dll’ could not be found PartsUnlimited.UnitTests C:Usersuser1SourceReposPartsUnlimitedtestPartsUnlimited.UnitTestsCSC 1 Active
Severity Code Description Project File Line Suppression State
Error Missing binding C:Usersuser1SourceReposPartsUnlimitedsrcPartsUnlimitedWebsitenode_modulesgrunt-sassnode_modulesnode-sassvendorwin32-x64-48binding.node PartsUnlimitedWebsite C:Usersuser1SourceReposPartsUnlimitedsrcPartsUnlimitedWebsiteEXEC 1
Severity Code Description Project File Line Suppression State
Warning Task «sass» not found.� Use —force to continue. PartsUnlimitedWebsite C:Usersuser1SourceReposPartsUnlimitedsrcPartsUnlimitedWebsiteEXEC 1
Severity Code Description Project File Line Suppression State
Error MSB3073 The command «grunt» exited with code 3. PartsUnlimitedWebsite C:Usersuser1SourceReposPartsUnlimitedsrcPartsUnlimitedWebsitePartsUnlimitedWebsite.csproj 41
- Remove From My Forums
-
Вопрос
-
We have a few C# Windows Forms solutions with some shared projects. Every project builds x86 and x64. The projects are included as such in almost every solution. When I open up Visual Studio and try to run the solution executable without compiling (F5), I get the CS0006 compiler error, and I can see in the output log and from the referenced metadata files that it’s trying to link to the x64 version of the reference (and again, in the startup project and every other project the reference is a project reference, not a direct DLL file reference) instead of the x86 version. I have double-checked the solution configuration and the x86 solution configuration (which is used) only builds the x86 project configuration for every project in every solution. There’s no mixup between x86 and x64, except that Visual Studio or CSC seems to pick the output file from the wrong project configuration.
Let’s call our solutions A, B and C. If we have A open, this is triggered by rebuilding in any other solution (B or C), which I guess rebuilds the shared projects, and then trying to run A in Visual Studio. Rebuilding everything in A always fixes the problem since I suppose it clears out everything and rebuilds the shared projects as well, but it’s problematic since it’s exactly what triggers the problem in B and C, and vice versa.
Has anyone had any similar problems?
We’re using Visual Studio 2008 SP1 and .NET 3.5 SP1 with the AnkhSVN and dotTrace add-ins, but the problem is intact when the add-ins are disabled. (Which figures. They shouldn’t affect compiler dependency tracking.)
-
Перемещено
27 октября 2008 г. 1:23
Off Topic for Visual C# General [loc] (Moved from Visual C# General to Off-Topic Posts (Do Not Post Here))
-
Перемещено