Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSBuild Properties not changing according to solution configuration #71

Closed
DrGierth opened this issue Nov 20, 2020 · 1 comment · Fixed by #77
Closed

MSBuild Properties not changing according to solution configuration #71

DrGierth opened this issue Nov 20, 2020 · 1 comment · Fixed by #77

Comments

@DrGierth
Copy link

DrGierth commented Nov 20, 2020

Hello,

this Script:
grafik

was original written when VS IDE Solution Configuration was set to "Debug", and it worked as it should.

After switching the VS IDE Solution Configuration to "Release" the output is still going to the debug folders.
Checking the MSBuild Properties in vsSBE shows debug setting:

grafik

Checking VS IDE Macros gives the expected setting:

grafik

Output-BuildOrder.txt
Output-vsSolutionBuildEvent.txt

Is my vsSBE configuration wrong or do we have an issue?

Thank you in advance for your efforts.

Michael

@3F
Copy link
Owner

3F commented Nov 23, 2020

Confirmed. Thanks for the report!

Seems like this affects only EnvDTE environment (VS IDE)

Temporarily you can either use CI environment https://www.nuget.org/packages/vsSolutionBuildEvent
or some conditions around $(Configuration) since it will be resolved correctly for both environments.

#[( $(Configuration) == "Release" )
{
    ...
}
else{  ...  }]

Unfortunately no ETA https://twitter.com/GitHub3F/status/1320425255291265026

@3F 3F added this to the 1.15 milestone Dec 15, 2021
3F added a commit that referenced this issue Jan 30, 2022
3F added a commit that referenced this issue Jan 31, 2022
3F added a commit to 3F/MvsSln that referenced this issue Jan 31, 2022
* FIXED: Incorrect project instances for the active solution configuration in XProject Environment.
         Related issue: 3F/vsSolutionBuildEvent#71

* FIXED: Fixed possible 'The path is not of a legal form.' when instantiating ProjectItem.

* NEW: Added .IsVc() extension method for ProjectItem objects.

* CHANGED: Updated logic for .IsSdk() extension method.
           Now it will use information from ProjectType when null or empty ProjectItem.fullPath.
           Otherwise, same logic from v2.5.3 described here: https://github.com/3F/MvsSln/blob/0ec96021b7/MvsSln/Extensions/ProjectItemExtension.cs#L59-L77
@3F 3F closed this as completed in #77 Feb 1, 2022
3F added a commit that referenced this issue Feb 1, 2022
…guration (#77)

* Updated the getting a project instance according to active solution configuration

Part of #71

* Fixed related MvsSln bug
3F/MvsSln@0b09b55

Part of #71

* Up to MvsSln 2.6.1
3F added a commit that referenced this issue Feb 2, 2022
* NEW: Visual Studio 2022 support. SDK17. PR #75

* FIXED: MSBuild Properties not changing according to solution configuration.
         Issue #71

* FIXED: Fixed unexpected plugin deactivation in Visual Studio 2010.

* FIXED: Fixed incorrect format of new generated .sln for CIM.

* CHANGED: Updated the follwoing references:

    * MSBuild 17.0.0 for SDK15 and SDK17 only
      https://www.nuget.org/packages/Microsoft.Build/17.0.0

    * MvsSln 2.6.1
      https://github.com/3F/MvsSln/releases/tag/2.6.1

    * 7z.Libs 21.6.0
      https://github.com/3F/7z.Libs/releases/tag/21.6.0

    * Microsoft.VisualStudio.Interop 17.0.32112.339
      https://www.nuget.org/packages/Microsoft.VisualStudio.Interop/17.0.32112.339

    * NLog 4.7.13
      https://github.com/NLog/NLog/releases/tag/v4.7.13

    * AvalonEdit 6.1.3.50
      https://github.com/icsharpcode/AvalonEdit/releases/tag/v6.1.3

    * System.Runtime.CompilerServices.Unsafe 5.0.0
      https://go.microsoft.com/fwlink/?LinkID=799421

    * Newtonsoft.Json 13.0.1
      https://github.com/JamesNK/Newtonsoft.Json/releases/tag/13.0.1

    * LSender 1.16
      https://github.com/3F/LSender/releases/tag/1.16

* KNOWN: 7z: relative paths like ..\Dir for input files lead to wrong filename in zip file.
         Please follow the temporary solution described here:
         #70

* NOTE: Choose the package that suits your needs:

        *.vsix  - Visual Studio
        *.nupkg - MSBuild
        *.zip   - API, samples, etc.

        GitHub: https://github.com/3F/vsSolutionBuildEvent/releases/tag/1.15
        NuGet:  https://www.nuget.org/packages/vsSolutionBuildEvent/

        * SDK17: Visual Studio 2022+
        * SDK15: Visual Studio 2019, 2017
        * SDK10: Visual Studio 2017, 2015, 2013, 2012, 2010
3F added a commit to 3F/vsCommandEvent that referenced this issue Feb 18, 2022
* NEW: Visual Studio 2022 support. SDK17.
       Related PR 3F/vsSolutionBuildEvent#75

* NEW: Extends events when a file is open from the solution explorer.
       Issue #5

* NEW: Added the ability to disable the CustomIn/CustomOut check.
       You can control parameters through script, for example:
       ```
        #[var v = #[DTE events.LastCommand.CustomOut]]
        ...
        $(v.Split(",")[0].Trim("{}"))
        == "Language":"CSharp"

        $(v.Split(",")[0].Trim("{}").Split(":")[1])
        == "CSharp"
       ```
       Details #7

* NEW: Extra events:
       Scope `@Document`     <- {2555243A-2A69-4335-BAD6-DDE9DFFE90F2}
       Scope `@OutputWindow` <- {600FCA14-172C-42F3-AC91-1BC5F32CF896}
       Scope `@Solution`     <- {AD4AD581-801F-4399-B986-27FE2D308BDD}
       Scope `@Window`       <- {69F5F698-996B-4293-9FE7-4202564FE6E5}
       Scope `@Debugger`     <- {4885535D-A7F9-46AB-A285-8E4D76F4C5B0}

* FIXED: Restored accidentally removed `raise` method in v1.3. Issue #6

* FIXED: MSBuild Properties not changing according to solution configuration.
         Related Issue 3F/vsSolutionBuildEvent#71

* FIXED: Fixed unexpected plugin deactivation in Visual Studio 2010.

* CHANGED: Updated the follwoing references:

    * MSBuild 17.0.0 for SDK15 and SDK17 only
      https://www.nuget.org/packages/Microsoft.Build/17.0.0

    * MvsSln 2.6.1
      https://github.com/3F/MvsSln/releases/tag/2.6.1

    * 7z.Libs 21.7.0
      https://github.com/3F/7z.Libs/releases/tag/21.7.0

    * Microsoft.VisualStudio.Interop 17.0.32112.339
      https://www.nuget.org/packages/Microsoft.VisualStudio.Interop/17.0.32112.339

    * NLog 4.7.13
      https://github.com/NLog/NLog/releases/tag/v4.7.13

    * AvalonEdit 6.1.3.50
      https://github.com/icsharpcode/AvalonEdit/releases/tag/v6.1.3

    * System.Runtime.CompilerServices.Unsafe 5.0.0
      https://go.microsoft.com/fwlink/?LinkID=799421

    * Newtonsoft.Json 13.0.1
      https://github.com/JamesNK/Newtonsoft.Json/releases/tag/13.0.1

    * LSender 1.16
      https://github.com/3F/LSender/releases/tag/1.16

* KNOWN: 7z: relative paths like ..\Dir for input files lead to wrong filename in zip file.
         Please follow the temporary solution described here:
         3F/vsSolutionBuildEvent#70

* NOTE: Choose the package that suits your needs:
        https://github.com/3F/vsSolutionBuildEvent/releases/tag/1.4

        * SDK17: Visual Studio 2022+
        * SDK15: Visual Studio 2019, 2017
        * SDK10: Visual Studio 2017, 2015, 2013, 2012, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants