net461 version of dotnet-aspnet-codegenerator-design.exe should be built for multiple platforms instead of win7-x86
See original GitHub issueFor a net461 project with RID as win7-x64, the dotnet-aspnet-codegenerator-design.exe causes exception as MVC tries to load the 32-bit assembly in a 64-bit process:
System.BadImageFormatException occurred
HResult=0x8007000B
Message=Could not load file or assembly 'dotnet-aspnet-codegenerator-design' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source=mscorlib
Sample project:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Formatters.Xml" Version="2.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>
</Project>
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
net461 version of dotnet-aspnet-codegenerator-design.exe ...
net461 version of dotnet-aspnet-codegenerator-design.exe should be built for multiple platforms instead of win7-x86 #601.
Read more >Cross-platform targeting for .NET libraries
The best way to call framework-specific APIs is using multi-targeting, which builds your project for many .NET target frameworks rather than for ...
Read more >Troubleshoot .NET Framework targeting errors
To resolve the error, make sure that your application targets a .NET version that's compatible with the version that's targeted by the projects ......
Read more >Rider: The Cross-Platform .NET IDE from JetBrains
NET IDE based on the IntelliJ platform and ReSharper. ... debugging multiple runtimes, Rider itself runs on multiple platforms: Windows, macOS, and Linux....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Eilon Is there a workaround in the meantime?
From: https://github.com/aspnet/Mvc/issues/6709#issuecomment-324969596