-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Error NETSDK1047: Assets file 'project.assets.json' doesn't have a target for '.NETCoreApp,Version=v5.0/linux-x64'. #24521
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
Comments
It appears to have something to do with the following addition to .NET 5 Preview 7: <RuntimeIdentifier>browser-wasm</RuntimeIdentifier> This is a Blazor WebAssembly application that I am trying to build, though that tag is on the client, not the server project. |
This looks like the RuntimeIdentifier being global property issue. |
Do you mean this is on my end? |
@BrunoBlanes this might be a bug in the product. The above comment is to help us to investigate |
Ok cool, thanks for clarifying! |
Thanks for contacting us. |
What we plan to do hereWe will consider thrown an error when a Blazor WebAssembly project is being build with a RID which is not |
What should I do to get Azure DevOps to build the project? |
I receive the same error when publishing my server project that references a Blazor wasm client project.
In DevOps:
|
I encountered the same problem (.NET5 preview 7):
Result: It works however in this case: |
@wli3 Any update on this one? The issue seems to persist with .NET 5 RC1. Azure DevOps Server is unable to build successfully. |
@wli3 I haven't tested it yet on RC1, however, the docs for the new version did mention that both lines below should be removed: <RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<UseBlazorWebAssembly>true</UseBlazorWebAssembly> So I don't think the error message should still be present. |
Bump. Am also having this issue even with non-Blazor projects. |
@pranavkm can you please make sure this is addressed in 5.0, if not already? Thanks! |
This has been addressed in 5.0-rc1. If you're still having trouble with Blazor WebAssembly projects, please share a minimal app that reproduces the issue. @RugerSR9 your problem appears to be different from the one being discussed here (since it's not specific to Blazor Wasm). Could you file a separate issue with a minimal app that exhibits the problem? Thanks! |
Haven't updated to RC1 yet, will do it and let you know. |
Thanks. Our migration notes covers changes to the project file when updating from a 3.1 project: https://docs.microsoft.com/en-us/aspnet/core/migration/31-to-50?view=aspnetcore-3.1&tabs=visual-studio#update-blazor-webassembly-projects |
So I've gone trough the process of migrating from .NET 5 Preview 8 to RC1 and now it doesn't even clean or build.
Here is my Server project file:<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
<Version>0.1.0.0</Version>
<StartupObject>CRM.Server.Program</StartupObject>
<PreserveCompilationContext>true</PreserveCompilationContext>
<UserSecretsId>311b3395-91d4-422a-82a7-52ea76f9e066</UserSecretsId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<!--<RuntimeIdentifiers>win-x86;win-x64;win-arm;linux-x64;linux-arm</RuntimeIdentifiers>-->
</PropertyGroup>
[...]
</Project> Here is my Client project file:<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
[...]
</Project> I tried repairing my .NET 5 RC1 installation and got the following error:
I don't know if the above error is related, but I tried cleaning the cache folder and reinstalling .NET 5 and restarting my computer. None fixed it. |
My
|
Your server project file shouldn't target the WebAssembly SDK: <!-- Server.csproj -->
- <Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
+ <Project Sdk="Microsoft.NET.Sdk.Web"> |
Ok, so that returns it to how it was working before, I can compile it fine on Visual Studio, but Azure Devops throws this:
|
Oh, wait, never mind, I was looking at the wrong build. It passed. |
I have an automated build pipeline in Azure DevOps and since I updated my project to .NET Preview 7 it throws this error during the build phase. Before this step a restore is successfully completed.
My project file already has framwork and runtime identifiers defined as shown:
The pipeline passed during Preview 6 with no other changes made to the project.
The text was updated successfully, but these errors were encountered: