premake / premake/premake-core

Platforms are not being applied correctly to Visual Studio projects

Open
#692 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

vs20xx
Dominant language
C
Stars
3.6k
Forks
654
Avg merge
1d 1h
Merged PRs (30d)
13

Description

I'm experiencing the following issue, I have a simple script with the following code

configurations { "Release","Debug" }
platforms { "Win32", "Win64" }

filter "platforms:Win32"
	architecture "x86"

filter "platforms:Win64"
	architecture "x86_64"

project "testproject"
	
	kind "StaticLib"
	language "C"
	includedirs { "../../deps/include" }
	files { "../../deps/src/*.c" }
	
	filter {"configurations:Debug"}
		defines { "_DEBUG" }
		symbols "On"
		targetname "depsd"
	
	filter {"configurations:Release"}
		defines { "NDEBUG" }
		flags { "MultiProcessorCompile" }
		optimize "Speed"
		targetname "deps"

The problem is that after generating the Visual Studio 2015 files, I can see that the target platforms have been created at the solution level, but not at the project level, I mean, the solution does have the Win32 and Win64 platforms, but the project doesn't.
I've also tried to redeclare the platforms inside the project, but still doesn't work.

Am I doing something wrong?
Thanks in advance!!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report by generating Visual Studio 2015 files from the shown Premake script, then compare the solution-level and project-level platform entries. Trace the Visual Studio generator's platform handling and confirm that Win32 and Win64 are emitted for the project as well as the solution.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, lua
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.