简体   繁体   中英

How to reference a different mscorlib.dll from within VS2015?

I'm contributing to CoreCLR and I'm building my own copy of mscorlib. I'm trying to test my changes via creating a new Console Application in VS and referencing that copy of mscorlib instead of the built-in one, but it doesn't seem to be working.

So far, I've added this line to my project's properties (by editing the .csproj file manually):

<NoStdLib>true</NoStdLib>

However, when I reload the project and go to References > Add Reference and select the custom-built mscorlib, I get this dialog box:

How do I fix this? Would I have to manually edit the .csproj file again, or is there some property I'm missing that would fix this error?

Thanks.

Ended up adding this to the .csproj file manually:

<ItemGroup>
  <Reference Include="mscorlib">
    <!-- Replace with whatever your path to mscorlib is -->
    <HintPath>$(UserProfile)\Code\git\coreclr\bin\Product\Windows_NT.x64.Release\mscorlib.dll</HintPath>
  </Reference>
</ItemGroup>

After that everything worked as expected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM