Minor changes to Visual Studio C# projects to avoid changes on save

This commit is contained in:
Jason Perkins 2013-05-15 11:15:54 -04:00
parent 5b81ba57ac
commit 8be16d75b8
4 changed files with 17 additions and 18 deletions

View File

@ -27,6 +27,7 @@
function cs2005.generate_ng(prj)
io.eol = "\r\n"
io.indent = " "
io.utf8()
premake.callarray(cs2005, cs2005.elements.project, prj)
@ -45,7 +46,7 @@
cs2005.targets(prj)
cs2005.buildEvents(prj)
_p('</Project>')
io.printf('</Project>')
end
@ -455,7 +456,8 @@
function cs2005.targetFrameworkProfile(prj)
if _ACTION == "vs2010" then
_p(2,'<TargetFrameworkProfile></TargetFrameworkProfile>')
_p(2,'<TargetFrameworkProfile>')
_p(2,'</TargetFrameworkProfile>')
end
end

View File

@ -50,7 +50,7 @@
vstudio = {
csprojSchemaVersion = "2.0",
productVersion = "9.0.21022",
productVersion = "9.0.30729",
solutionVersion = "10",
toolsVersion = "3.5",
}

View File

@ -69,24 +69,15 @@
--
function io.printf(msg, ...)
if not io.eol then
io.eol = "\n"
end
if not io.indent then
io.indent = "\t"
end
if type(msg) == "number" then
local str, fmt, x = unpack(arg)
s = string.rep(io.indent, msg) .. string.format(unpack(arg))
s = string.rep(io.indent or "\t", msg) .. string.format(unpack(arg))
else
s = string.format(msg, unpack(arg))
end
if not io._captured then
io.write(s)
io.write(io.eol)
else
table.insert(io._captured, s)
io._captured_string = nil
@ -108,16 +99,21 @@
-- for it. This saves me typing, and also reduces the size of the executable.
--
_p = io.printf
function _p(msg, ...)
io.printf(msg, unpack(arg))
if not io._captured then
io.write(io.eol or "\n")
end
end
--
-- Another variation that calls esc() on all of its arguments before formatting.
--
_x = function(msg, ...)
function _x(msg, ...)
for i=2, #arg do
arg[i] = premake.esc(arg[i])
end
io.printf(msg, unpack(arg))
_p(msg, unpack(arg))
end

View File

@ -57,7 +57,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{AE61726D-187C-E440-BD07-2556188A6565}</ProjectGuid>
<OutputType>Exe</OutputType>
@ -84,7 +84,8 @@
<RootNamespace>MyProject</RootNamespace>
<AssemblyName>MyProject</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile></TargetFrameworkProfile>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
]]