-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
3.0 preview8 - Build failure with Directory.props and user secrets #3290
Comments
@livarcocc or @nguerrera - any troubleshooting suggestions? |
It is possible the namespace has moved from 2.2 to 3.0 on ASP.NET's side. @mkArtakMSFT would you know? |
Adding @Tratcher in case he has some contest here. |
No, I don't see any changes here. The implication is that it's missing the Microsoft.Extensions.* assembly references. Can you share the csproj file? Does it work if you change the library targetframework to netcoreapp3.0? |
The SDK semi-blindly emits the attribute if |
cc @dsplaisted |
This would be a breaking change in 3.0 SDK. |
@BrunoDrljanovcan Can you share an example of a project that is failing to build with the updated sdk, or a binlog of the failing build? |
This is super easy to isolate: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<UserSecretsId>foo</UserSecretsId>
</PropertyGroup>
</Project>
Happens for any Just that for the OP the |
It's pretty much what @dasMulli wrote here. Although TargetFramework is netcoreapp2.2. |
Relevant comment on PR when this was added: https://github.com/dotnet/sdk/pull/2774/files#r247013838 |
This will be fixed in 3.1. It has also been added to the list of known issues for the .NET Core 3.0 SDK: https://github.com/dotnet/core/blob/master/release-notes/3.0/3.0-known-issues.md |
3.0 preview8 - Build failure with Directory.props and user secrets
3.0 preview8 sdk is unable to build some assemblies because the generated assmblyinfo.cs is throwing error CS0234 .
The exact build runs successfully when core 2.2 sdk.
General
3.0 preview8 sdk is unable to build some assemblies because the generated assmblyinfo.cs is throwing error. Some properties are copied from Directory.Build.props.
line:
[assembly: Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute("secrets_file")]
error:
Error CS0234 The type or namespace name 'Extensions' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
While building this library with 2.2 it runs successfully (not sure for preview versions between), preview8.0 fails to build.
The text was updated successfully, but these errors were encountered: