question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feature] MSBuild add upgrade_project again

See original GitHub issue

Continuing https://github.com/conan-io/conan/issues/11966

The new MSBuild didn’t port upgrade_project attribute from old MSBuild.

Motivation: I started to port xz_utils recipe and it comes with .sln files, and when need to build using the new MSBuild, the expected SDK version is older, and it would be great if I could update the .sln file automatically.

I think it should be a MSBuild attribute as it should not change:

msbuild = MSBuild(self)
msbuild.upgrade_project = True (default True)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
uilianriescommented, Aug 30, 2022

@memsharded Excellent then. I would be great an example on docs.conan.io, just in case people arrive to the same situation.

1reaction
memshardedcommented, Aug 29, 2022

self.run() defaults to self.run(..., env=["conanbuild.bat|sh"]), being conanbuildenv script generated by VirtualBuildEnv, and automatically added to conanbuild aggregator. So as long as self.run() is executed after generate() of VirtualBuildEnv (explicit or implicit via auto_use conf), it should work

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to upgrade a solution and project files from the command ...
a) To upgrade solution file: devenv.exe /upgrade <solution file (.sln)>; or. b) To upgrade project file: devenv.exe /upgrade <project file (.vcproj)>.
Read more >
upgrade error : "MSBUILD : error MSB1008" · Issue #7408
Describe the bug Show errors after upgrade project from v2.1.0 to v2.3.0. ... we may add more features in the future on different...
Read more >
Extend the build process - MSBuild | Microsoft Learn
The Visual Studio build process is defined by a series of MSBuild .targets ... Insert tasks to run after build here --> </Target>...
Read more >
MSBuild — conan 1.55.0 documentation
Calls Visual Studio MSBuild command to build a .sln project: ... def build(self, project_file, targets=None, upgrade_project=True, build_type=None, ...
Read more >
Can't Upgrade Project when New Engine Version Released
Throw it up at the top and try again. Don't worry about any of the IntelliSense errors. Those mostly drop out after you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found