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

Support of the modern 15+ products #45

Merged
merged 8 commits into from Jun 28, 2019
Merged

Support of the modern 15+ products #45

merged 8 commits into from Jun 28, 2019

Conversation

@3F
Copy link
Owner

@3F 3F commented Jun 5, 2019

Fixes #44
Adds full support for VS2017, VS2019

Related issue:

  • Visual Studio 2019 supprt #44
  • Update support of VS2017 #39

Known problems

  • [VS feature] Build can be started before activation of our plugin:

  • Deactivated [Status Panel] (from View - Other Windows) - Affected VS2017 when upgrading from SDK10 release to SDK15

    • Solution: Just close this panel. Then, open it again from View - Other Windows
  • Deadlocks for async FindToolWindowAsync: #45 (comment)

    • Our final logic fully avoids VS bug.

TODO:

  • Implement AsyncPackages.
  • Build individual vsix packages: VS2010-VS2015 (vsixmanifest v1) and VS2017+.
  • Review of the delayed activation of our plugin when build is started.
  • An autoloads problem when DefaultInvisible state.
  • Possible deadlocks with FindToolWindowAsync /16.1.1.
  • netfx target platform changes:
    * 4.0 only; VS2010-VS2015
    * 4.6 only; VS2017+
  • Rewrite logic OnAfterOpenSolution() because of InitializeAsync. [?]
@3F 3F marked this pull request as ready for review Jun 5, 2019
vsSolutionBuildEvent/StatusToolCommand.cs Outdated Show resolved Hide resolved
vsSolutionBuildEvent/vsSolutionBuildEventPackage.cs Outdated Show resolved Hide resolved
@3F 3F mentioned this pull request Jun 5, 2019
@3F 3F added this to the 0.12.11 milestone Jun 7, 2019
@3F
Copy link
Owner Author

@3F 3F commented Jun 9, 2019

FindToolWindowAsync (like ShowToolWindowAsync) - More probably this is a VS bug because it uses CreateToolWindow and this failed only when ToolPane is not activated after starting VS IDE.

That is, I have no problems when CreateToolWindow is used from different thread outside InitializeAsync() from our plugin with JoinableTaskFactory.

protected override async Task InitializeAsync(CancellationToken ct, IProgress<ServiceProgressData> progress)
{
    await this.JoinableTaskFactory.SwitchToMainThreadAsync(ct);

    // UI thread

    CreateToolWindow(typeof(StatusToolWindow), 0); // <<< await FindToolWindowAsync()

Same result for updated VS 16.1.2

For today, I think I will use an old FindToolWindow() byound InitializeAsync() thread. After cb8d9d8 works well.

Any suggestions are welcomed.

3F added 3 commits Jun 24, 2019
* DBG_SDK10 & DBG_SDK15
* DCI_SDK10 & DCI_SDK15
* RCI_SDK10 & RCI_SDK15
* REL_SDK10 & REL_SDK15

Also:

* Updated source code and project files for both SDK10/SDK15.
* Fixed problem: Found conflicts between different versions of "Microsoft.VisualStudio.Threading" & "Microsoft.Build.Framework"
…S2017+

Also:

* Replaced old msbuild helper on hMSBuild 2.1 https://github.com/3F/hMSBuild
* Updated GetNuTool up to 1.7 https://github.com/3F/GetNuTool
* Disabled Devenv for SDK15
* Changed id 1 to 0 for initToolPane / initToolPaneAsync
@3F
Copy link
Owner Author

@3F 3F commented Jun 28, 2019

Known build problems

Build works only with x32 tools. hMSBuild -notamd64

For x64 binaries, MS VSSDK 15.0 (VM image VS2017) seems does not support something:

\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VisualStudio.Sdk.BuildTasks.15.0.dll

RCI_SDK10:

https://ci.appveyor.com/project/3Fs/vssolutionbuildevent/builds/25615389#L89

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VsSDK.targets(87,5): 
error MSB4062: The "CompareBuildTaskVersion" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VisualStudio.Sdk.BuildTasks.15.0.dll. 
Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VisualStudio.Sdk.BuildTasks.15.0.dll' or one of its dependencies. 
An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. 
[C:\projects\vssolutionbuildevent\vsSolutionBuildEvent\vsSolutionBuildEvent.csproj]

RCI_SDK15:

https://ci.appveyor.com/project/3Fs/vssolutionbuildevent/builds/25615482#L89

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VsSDK.targets(87,5): 
error MSB4062: The "CompareBuildTaskVersion" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VisualStudio.Sdk.BuildTasks.15.0.dll. 
Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VisualStudio.Sdk.BuildTasks.15.0.dll' or one of its dependencies. 
An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. 
[C:\projects\vssolutionbuildevent\vsSolutionBuildEvent\vsSolutionBuildEvent.csproj]

Same for MS VSSDK 16.0 (VM image VS2019)

\MSBuild\Microsoft\VisualStudio\v16.0\VSSDK\Microsoft.VisualStudio.Sdk.BuildTasks.16.0.dll

https://ci.appveyor.com/project/3Fs/vssolutionbuildevent/builds/25615597#L89

RCI_SDK15:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\VSSDK\Microsoft.VsSDK.targets(88,5): 
error MSB4062: The "CompareBuildTaskVersion" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\VSSDK\Microsoft.VisualStudio.Sdk.BuildTasks.16.0.dll. 
Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\VSSDK\Microsoft.VisualStudio.Sdk.BuildTasks.16.0.dll' or one of its dependencies. 
An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. 
[C:\projects\vssolutionbuildevent\vsSolutionBuildEvent\vsSolutionBuildEvent.csproj]

@3F 3F changed the title WIP Support of the modern 15+ products Support of the modern 15+ products Jun 28, 2019
@3F 3F merged commit 8fc64b2 into master Jun 28, 2019
2 checks passed
3F added a commit that referenced this issue Jun 30, 2019
* NEW: Visual Studio 2019 full support. SDK15. PR #45.

* NEW: Complete integration with VS2017. SDK15. PR #45.

       For VS2017 will be also available old SDK10 package implementation.
       But SDK15 is recommended.

* FIXED: Fixed IEnvironment.ProjectsMBE implementations.

* CHANGED: netfx target platform changes:

           * 4.0 only: VS2010, VS2012, VS2013, VS2015, VS2017
           * 4.6 only: VS2017, VS2019

* CHANGED: Replaced old msbuild helper on hMSBuild 2.1
           https://github.com/3F/hMSBuild

* CHANGED: Devenv netfx 4.0 only (SDK10).

* KNOWN: Known problem with VS2019 when modern VS platform produces the case when
         Build can be started before activation of our plugin.

         Solution: Just attach once our [status panel] and it will activate our plugin
         for early registering handlers.

* KNOWN: Known problem with VS2017 when upgrading from SDK10 release to SDK15:
         Deactivated [Status Panel] from `View` - `Other Windows`.

         Solution: Just close this panel. Then, open it again.

* NOTE: Our new releases migrated from SourceForge to GitHub Release Page:
        https://github.com/3F/vsSolutionBuildEvent/releases

        Most actual information is still here: https://vssbe.r-eg.net/Downloads/

* NOTE: About SDK10 / SDK15 versions:
        https://vssbe.r-eg.net/doc/Usage/#sdk10--sdk15-versions
@3F 3F deleted the support/vs15+ branch Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

1 participant