-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Disable support for MetadataUpdate (hot reload) in non-Debug builds. #18810
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
Conversation
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
sbomer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
In general, So in this case, the |
| Value="$(ThreadPoolMaxThreads)" /> | ||
| </ItemGroup> | ||
|
|
||
| <PropertyGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like an odd spot for this property group. Would it make sense to go higher in the file, before any <Targets>? Like maybe around line 100?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking a bit more, should this switch get set for PublishTrimmed=true instead of non-Debug configurations? Does it have any effect on non-trimmed applications?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pranavkm explained to me that setting this for PublishTrimmed=true would be a bad idea because then it would be disabled even during dotnet run and when debugging. So I realize now that was not a good idea.
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets
Outdated
Show resolved
Hide resolved
It's also important because putting things in targets lets you make decisions based on what a user configured in their project file. Props file is imported before a project, so you can't do that. @eerhardt updated to add a test. |
eerhardt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
| { | ||
| } | ||
|
|
||
| [CoreMSBuildOnlyFact] // Running on desktop causes failures attempting to restore M.NETCore.App.WinHost. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems like a bug somewhere.... This is a super simple test....
cc @dsplaisted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was misled by the error messages. It looked like it was restore failures, but it looks like it's because of the new compiler feature that needs a newer VS on the Helix machine:
"C:\h\w\B468094B\t\dotnetSdkTests\dft2qt2w.g3m\It_Configures---A34EAFFF\HelloWorld.csproj" (Build target) (1:7) ->
(CoreCompile target) ->
C:\h\w\B468094B\t\dotnetSdkTests\dft2qt2w.g3m\It_Configures---A34EAFFF\obj\Debug\net6.0\HelloWorld.ImplicitNamespaceImports.cs(2,1): error CS8652: The feature 'global using directive' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version. [C:\h\w\B468094B\t\dotnetSdkTests\dft2qt2w.g3m\It_Configures---A34EAFFF\HelloWorld.csproj]
C:\h\w\B468094B\t\dotnetSdkTests\dft2qt2w.g3m\It_Configures---A34EAFFF\obj\Debug\net6.0\HelloWorld.ImplicitNamespaceImports.cs(3,1): error CS8652: The feature 'global using directive' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version. [C:\h\w\B468094B\t\dotnetSdkTests\dft2qt2w.g3m\It_Configures---A34EAFFF\HelloWorld.csproj]
C:\h\w\B468094B\t\dotnetSdkTests\dft2qt2w.g3m\It_Configures---A34EAFFF\obj\Debug\net6.0\HelloWorld.ImplicitNamespaceImports.cs(4,1): error CS8652: The feature 'global using directive' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version. [C:\h\w\B468094B\t\dotnetSdkTests\dft2qt2w.g3m\It_Configures---A34EAFFF\HelloWorld.csproj]
C:\h\w\B468094B\t\dotnetSdkTests\dft2qt2w.g3m\It_Configures---A34EAFFF\obj\Debug\net6.0\HelloWorld.ImplicitNamespaceImports.cs(5,1): error CS8652: The feature 'global using directive' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version. [C:\h\w\B468094B\t\dotnetSdkTests\dft2qt2w.g3m\It_Configures---A34EAFFF\HelloWorld.csproj]
C:\h\w\B468094B\t\dotnetSdkTests\dft2qt2w.g3m\It_Configures---A34EAFFF\obj\Debug\net6.0\HelloWorld.ImplicitNamespaceImports.cs(6,1): error CS8652: The feature 'global using directive' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version. [C:\h\w\B468094B\t\dotnetSdkTests\dft2qt2w.g3m\It_Configures---A34EAFFF\HelloWorld.csproj]
C:\h\w\B468094B\t\dotnetSdkTests\dft2qt2w.g3m\It_Configures---A34EAFFF\obj\Debug\net6.0\HelloWorld.ImplicitNamespaceImports.cs(7,1): error CS8652: The feature 'global using directive' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version. [C:\h\w\B468094B\t\dotnetSdkTests\dft2qt2w.g3m\It_Configures---A34EAFFF\HelloWorld.csproj]
C:\h\w\B468094B\t\dotnetSdkTests\dft2qt2w.g3m\It_Configures---A34EAFFF\obj\Debug\net6.0\HelloWorld.ImplicitNamespaceImports.cs(8,1): error CS8652: The feature 'global using directive' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version. [C:\h\w\B468094B\t\dotnetSdkTests\dft2qt2w.g3m\It_Configures---A34EAFFF\HelloWorld.csproj]
0 Warning(s)
7 Error(s)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ouch. Can you open an issue for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| var testAsset = _testAssetsManager | ||
| .CopyTestAsset("HelloWorld") | ||
| .WithSource() | ||
| .WithTargetFramework("net6.0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| .WithTargetFramework("net6.0"); | |
| .WithTargetFramework(targetFramework); |
| var testAsset = _testAssetsManager | ||
| .CopyTestAsset("HelloWorld") | ||
| .WithSource() | ||
| .WithTargetFramework("net6.0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| .WithTargetFramework("net6.0"); | |
| .WithTargetFramework(targetFramework); |
No description provided.