Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6588093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:00:11+00:00 2026-05-25T17:00:11+00:00

I have a (python) script that accomplishes the following: Scanning a folder looking for

  • 0

I have a (python) script that accomplishes the following:

  1. Scanning a folder looking for .csproj and .vcproj files.
  2. Creating a solution file to contain all the projects by writing text according to the .csproj and .vcproj files.
  3. Building that solution. By calling devenv.exe /Build from command line (subprocess.call on python).

My problem is: When I build, VS changes configuration in my SLN. Specifically, on SLN’s Win32 configuration, all the .csproj projects (.NET projects) switch from x86 to x64 and are marked out from the build.

Attempt that did not work:
Changing the SLN to have all the .NETs at x86 and the VCs on Win32 under x86 solution config. Again, VS breaks it when it opens the SLN : VCs are automatically change to target x64 and marked out of the build.

Attempt that worked but quite clumsy:
First, I let VS break the file. The only clumsy way that I managed to do that is calling /Build then /Clean from command line. Next, I fix the SLN file by replacing the configs that VS broke. And now when I /Build it, VS does not alter the SLN.

So:

  1. Anyone with a more elegant solution ?
  2. Any nicer way to make VS break the file other then /Build – /Clean ?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:00:11+00:00Added an answer on May 25, 2026 at 5:00 pm

    The simple answer is, indentation matters to the VS sln parser.

    So folks at the company claimed it all worked back in the day, and I found it hard to believe. Over and over again I scanned the code that builds it and the sln file that is produced and couldn’t tell any difference.

    Beacuse I didn’t look at whitespaces !

    Month ago I innocently changed the code that builds the .sln file to write the file with different indentation.

    Here’s the difference of the files:

    That worked, because the file was identical to a VS-made file, including the indenetation:

    Microsoft Visual Studio Solution File, Format Version 10.00
    # Visual Studio 2008
    Project("{19091980-2008-4CFA-1491-04CC20D8BCF9}") = "proj1", "..\proj1_2008.vcproj", "{C844505D-3D9E-437F-94D6-BDA74999651D}"
    ...
    EndProject
    Project ...
    ..
    EndProject
    Global
    Global
      GlobalSection(SolutionConfigurationPlatforms) = preSolution
    *good     Debug|Win32 = Debug|Win32
              Debug|x64 = Debug|x64
              Release|Win32 = Release|Win32
              Release|x64 = Release|x64
      EndGlobalSection
      ....
    

    This one caused VS to re-edit, and as a side eefect to break our desired solution configuration:

    Microsoft Visual Studio Solution File, Format Version 10.00
    # Visual Studio 2008
    Project("{19091980-2008-4CFA-1491-04CC20D8BCF9}") = "proj1", "..\proj1_2008.vcproj", "{C844505D-3D9E-437F-94D6-BDA74999651D}"
    ...
    EndProject
    Project ...
    ..
    EndProject
    Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
    *bad    Debug|Win32 = Debug|Win32
    *indent-Debug|x64 = Debug|x64
    *ation  Release|Win32 = Release|Win32
            Release|x64 = Release|x64
        EndGlobalSection
        ....
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a python script that reads from a config file. The config file
I have a Python script that takes in '.html' files removes stop words and
I have a python script that, in it's initialize runmode, accesses multiple files on
I have a python script that analyzes a set of error messages and checks
I have a Python script that needs to execute an external program, but for
I have a python script that is a http-server: http://paste2.org/p/89701 , when benchmarking it
I have a python script that I would like to add a Shutdown when
I have a python script that has to launch a shell command for every
I have a Python script that calls an executable program with various arguments (in
How do I have a Python script that can accept user input and how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.