Skip to content
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

Unable to build TiledPluginCore on NetStandard branch #72

Closed
patridge opened this issue Mar 31, 2021 · 4 comments
Closed

Unable to build TiledPluginCore on NetStandard branch #72

patridge opened this issue Mar 31, 2021 · 4 comments

Comments

@patridge
Copy link
Contributor

As of commit 27da7c8, I was getting a build error when building the solution of Glue with All.sln from source.

Error    CS0579    Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute    TiledPluginCore    C:\dev\FlatRedBall\FRBDK\Glue\TileGraphicsPlugin\TileGraphicsPlugin\obj\x86\Debug\netcoreapp3.0.NETCoreApp,Version=v3.0.AssemblyAttributes.cs    4    Active

In chat, it was thought that I was missing the .NET Core version 3.0.1. I ran the installer and it said it was already there, so I tried repairing the install without any luck. Not sure if it's one that even shows up in the dotnet list, but listing all my installed .NET Core SDKs doesn't show that specific version.

> dotnet --list-sdks
3.1.301 [C:\Program Files\dotnet\sdk]
3.1.407 [C:\Program Files\dotnet\sdk]
5.0.100 [C:\Program Files\dotnet\sdk]
5.0.103 [C:\Program Files\dotnet\sdk]
5.0.104 [C:\Program Files\dotnet\sdk]
5.0.201 [C:\Program Files\dotnet\sdk]

Workaround

It remains to be seen if there are other issues caused by this workaround, but I was able to get the project (and full solution) to build after adding this line to the TilePluginCore.csproj file.

<PropertyGroup>
  <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
  <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute><!-- added this -->
  <Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>
@patridge
Copy link
Contributor Author

patridge commented Mar 31, 2021

[Edit: no longer an problem related to this issue.]

Possible that the .NET Core 3.0.1 installer just can't do what it wants. I got this when I tried to play a project in Glue.

Could not find msbuild.exe. Looked in the following locations:
C:/dev/FlatRedBall/FRBDK/Glue/Glue/bin/x86/Debug/netcoreapp3.0/Tools/MSBuild/15.0/MSBuild.exe
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/amd64/MSBuild.exe
C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin/MSBuild.exe
C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe
C:/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe

@patridge
Copy link
Contributor Author

If I build projects in VS2019 that fail in Glue with the above msbuild.exe error, they seem to build and run fine.

@patridge
Copy link
Contributor Author

patridge commented Apr 1, 2021

In my latest attempts, I no longer have the msbuild.exe errors. I still require adding the csproj element.

@vchelaru
Copy link
Owner

vchelaru commented Apr 1, 2021

I believe both issues are solved now.

@vchelaru vchelaru closed this as completed Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants