-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move the default location for ref assemblies to obj (from bin) #6543
Comments
Microsoft-internal link to discussion where we were unable to remember any specific reason that it should be in |
Ended up finding a number of other issues discussing
|
Can't any customer that prefers the current location just override |
Yes, but they'd have to discover it. I think that's likely good enough personally but I've been wrong before . . . |
I'm not okay with This is also why I proposed a root |
Is it? It is generally an internal implementation detail of intermediate assemblies in the build. It's not generally shipped to customers, for example. In the cases where it is, you can opt to specify that it go in your own bin folder. |
True but I think of them as a stripped down version of the main Assembly, much like .NET Framework reference assemblies! I'm not okay with either way, I do get that some do copy/move all assemblies by wildcard and that might be confusing but producing reference assemblies is not a novice feature. So, in that perspective, we can keep it as it is or we could introduce |
Fixes #6543 ### Context The location of this file is mostly irrelevant, and users find it confusing when it's in the output folder. ### Changes Made Changed the compiler's obj output to a folder named `refint` and changed the "final" output ref assembly to live in `obj/ref` (modulo other variables). Did this under a double opt-out: it's in the 17.0 changewave, and there's a new property `$(ProduceReferenceAssemblyInBin)`. ### Notes Naming on . . . everything is up for debate. Co-authored-by: Nirmal Guru <Nirmal4G@gmail.com>
Fixes #6543 ### Context #6560 made `TargetRefPath` relative by mistake, which broke build in Visual Studio. ### Changes Made Use `MSBuildProjectDirectory` to properly root the path. ### Testing Verified that VS build works with this fix. ### Notes ``` 0:010> !pe Exception object: 0000020fa4de3a90 Exception type: System.IO.DirectoryNotFound ExceptionMessage: Could not find a part of the path 'C:\WINDOWS\system32\obj\Debug\net6.0\ref\HelloWorld.dll'. 0:010> !clrstack OS Thread Id: 0x95c (10) Child SP IP Call Site 000000bc6023cf88 00007ffb12634ed9 [HelperMethodFrame: 000000bc6023cf88] 000000bc6023d070 00007ffb037dba49 System.IO.__Error.WinIOError(Int32, System.String) 000000bc6023d0c0 00007ffb0408d7e6 System.IO.File.InternalCopy(System.String, System.String, Boolean, Boolean) 000000bc6023d150 00007ffaa7303d70 Microsoft.CodeAnalysis.BuildTasks.CopyRefAssembly.Copy() 000000bc6023d1b0 00007ffaa7303bad Microsoft.CodeAnalysis.BuildTasks.CopyRefAssembly.Execute() ```
This was reverted so reopening. Blocked by IDE support (dotnet/project-system#7444 and dotnet/roslyn#55244). |
They are moved--see dotnet/msbuild#6543
[release/6.0.2xx] Update dependencies from dotnet/msbuild - Update VS package version - Stop assuming ref assemblies are in output folder They are moved--see dotnet/msbuild#6543 - fixup! Stop assuming ref assemblies are in output folder - fixup! Stop assuming ref assemblies are in output folder - fixup! fixup! Stop assuming ref assemblies are in output folder - Only test ref outputs on newer MSBuild Specifically these will fail due to an extra file in bin before the VS MSBuild has dotnet/msbuild#7075. - fixup! Only test ref outputs on newer MSBuild
- Fix reference assembly output path (see dotnet/msbuild#6543) bumps #minor version
- Fix reference assembly output path (see dotnet/msbuild#6543) - Remove 'true' from nuget push --no-symbols parameter in CI workflow (see NuGet/Home#11601) - Use standard .NET 6 SDK container image in CI workflow bumps #minor version
Today, ref assemblies are copied into the
bin/ref
folder by default. However, this is a sometimes confusing and unexpected output that is primarily used for internal build-performance reasons.For Visual Studio 2022 we'd like to move this to a folder under
obj
.The code change is to update this:
msbuild/src/Tasks/Microsoft.Common.CurrentVersion.targets
Line 326 in 18a8ddc
The compat impact is less clear; some customers may have projects that expect the presence in
ref
. We could provide an opt-out (and/or put this under a changewave) but we'd like to hear from anyone who objects to this plan.The text was updated successfully, but these errors were encountered: