-
-
Notifications
You must be signed in to change notification settings - Fork 619
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
Error loading/configuring a C# .net project #1865
Comments
I ran into the same error, You can boil it down to dotnetframework "net6.0" not playing nice with platforms(). However, dotnetframework "4.8" works fine. Below is a minimal premake5.lua to replicate the problem. I have a premake5 v5.0.0-dev that works just fine with this file, though this script spits out Error: [string "vstudio/vs2005.lua"]:9: attempt to index a nil value (field 'sln2005') when attempting to run it with the premake5 5.0.0-beta1 off the wiki binaries. I didn't look into that further and is not related to this issue.
EDIT: |
Yep, that's the problem, thanks! Hope they can solve it |
Apologies on long turn around time. I'm going to start looking into this today and will hopefully have a fix out soon! |
Posting here as it seems related: |
What seems to be the problem?
Hi everyone! First of all thanks in advance for your help.
I'm trying to set up my C# .net project with premake5 and I'm having the next error:
Current solution contains incorrect configurations mappings. It may causes projects to not work correctly. Open the Configuration Manager to fix them.
This happens right after generating the project files when I open the Visual Studio solution.
Which is quite weird is if I press the "Open Configuration Manager" button and close the pop up without changing anything. It works.
Apart from that, the bin and obj directories are not properly configurated. I got a bin/ and obj/ generated inside the project folder.
What did you expect to happen?
A C# .net project working fine. Also the bin and obj directories generated inside the project folder should be in the targetdir and objdir specificated locations
What have you tried so far?
I've tried to write my own Directory.Build.props in order to patch some errors but it doesn't work as expected and as I said it's just a patch. I would like premake5 to do this.
How can we reproduce this?
You can reproduce this by replicating my little test project. Having installed NET core 6.0 and visual studio tools needed to create a net core project.
This is my directory hierarchy:
The code of Workspace premake looks like this:
The code of Project premake looks like this:
That is all you need to reproduce the bug.
What version of Premake are you using?
premake5 (Premake Build Script Generator) 5.0.0-beta1
I tried building for Visual Studio 2019 and 2022.
Anything else we should know?
As I said the project builds once I hit the "Open Configuration Manager" but the platform for this build is "Any CPU" and I can't change that.
The text was updated successfully, but these errors were encountered: