diff options
author | Matt Ward <matt.ward@microsoft.com> | 2020-01-06 21:50:37 +0300 |
---|---|---|
committer | monojenkins <jo.shields+jenkins@xamarin.com> | 2020-01-08 15:58:16 +0300 |
commit | 73bb9bf0ccf6f0cdf25a823d642a1a7cab83b6fd (patch) | |
tree | 90357fdd6bc25e1ff0463d857780b706f5e0b7f8 /main/tests/test-projects | |
parent | d60a8d185a881f99e8b3315878b32c6bc210e3b2 (diff) |
[Ide] Fix intellisense not updated after adding target frameworks
Editing an SDK project that targeted a single target framework so it
targets multiple target frameworks would result in the intellisense
not being updated from that point when the project changed, such as
when a new file was added.
The problem was that the Project.Modified event handler was removed
for the project when the old project was removed since the Roslyn
project id to project mapping had already been updated during the
reload to point to the new project. To avoid this a check is made to
ensure that no other project ids exist in the mapping before the
event handler is removed.
Fixes VSTS #1035311 - Wrong version of multi target project referenced
in .net framework project
Diffstat (limited to 'main/tests/test-projects')
4 files changed, 39 insertions, 0 deletions
diff --git a/main/tests/test-projects/multi-target-reload/Class1.cs b/main/tests/test-projects/multi-target-reload/Class1.cs new file mode 100644 index 0000000000..b9a6178638 --- /dev/null +++ b/main/tests/test-projects/multi-target-reload/Class1.cs @@ -0,0 +1,8 @@ +using System;
+
+namespace netstandard_sdk
+{ + public class Class1 + { + }
+}
diff --git a/main/tests/test-projects/multi-target-reload/multi-target-reload.csproj b/main/tests/test-projects/multi-target-reload/multi-target-reload.csproj new file mode 100644 index 0000000000..3a7cf65410 --- /dev/null +++ b/main/tests/test-projects/multi-target-reload/multi-target-reload.csproj @@ -0,0 +1,7 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFrameworks>netstandard2.0;net462</TargetFrameworks> + </PropertyGroup> + +</Project> diff --git a/main/tests/test-projects/multi-target-reload/multi-target-reload.sln b/main/tests/test-projects/multi-target-reload/multi-target-reload.sln new file mode 100644 index 0000000000..c51af14ae8 --- /dev/null +++ b/main/tests/test-projects/multi-target-reload/multi-target-reload.sln @@ -0,0 +1,17 @@ +
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "netstandard", "netstandard.csproj", "{5B443F8D-6C84-443F-A395-5429E8F4A47D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5B443F8D-6C84-443F-A395-5429E8F4A47D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5B443F8D-6C84-443F-A395-5429E8F4A47D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5B443F8D-6C84-443F-A395-5429E8F4A47D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5B443F8D-6C84-443F-A395-5429E8F4A47D}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/main/tests/test-projects/multi-target-reload/netstandard.csproj b/main/tests/test-projects/multi-target-reload/netstandard.csproj new file mode 100644 index 0000000000..b290d67fb7 --- /dev/null +++ b/main/tests/test-projects/multi-target-reload/netstandard.csproj @@ -0,0 +1,7 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>netstandard1.4</TargetFramework> + </PropertyGroup> + +</Project> |