Skip to content
Snippets Groups Projects
Commit 2722074e authored by Recolic K's avatar Recolic K
Browse files

fix another csproj error in controlplane

parent b80b5350
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ import ( ...@@ -10,7 +10,7 @@ import (
// Some options here. Would be improved in beta release. // Some options here. Would be improved in beta release.
const DEDUCT_PKGNAME_FROM_VARNAME = true const DEDUCT_PKGNAME_FROM_VARNAME = true
const USE_PROJECT_NETVER_INSTEAD_OF_HINTPATH_NETVER = false const USE_PROJECT_NETVER_INSTEAD_OF_HINTPATH_NETVER = false
const OPENXT_VERSION = "1.2-2" const OPENXT_VERSION = "1.2-3"
func print_help_and_exit() { func print_help_and_exit() {
println("Usage: openxt <subcommand> [options...]") println("Usage: openxt <subcommand> [options...]")
......
...@@ -130,6 +130,11 @@ func main() { ...@@ -130,6 +130,11 @@ func main() {
resultTxt += line + "\n" resultTxt += line + "\n"
} }
// patch: if the csproj has no <TargetFramework> and <TargetFrameworkVersion> at all, we must fix this error with a default targetFramework.
if ! (stringContainsInsensitive(resultTxt, "<TargetFramework>") || stringContainsInsensitive(resultTxt, "<TargetFrameworkVersion>")) {
stringReplaceOnceInsensitive(resultTxt, "<PropertyGroup>", "<PropertyGroup><TargetFramework>net472</TargetFramework><GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>")
}
err = ioutil.WriteFile(fname, []byte(resultTxt), 0644) err = ioutil.WriteFile(fname, []byte(resultTxt), 0644)
panicErrorIfAny(err, "WriteFile " + fname) panicErrorIfAny(err, "WriteFile " + fname)
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment