forked from OmniSharp/omnisharp-roslyn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with C# projects referencing F# projects
This fixes a long-standing problem where C# projects would attempt to load project references to non-C# projects. This is related to the problem on not adding file references for C# project references to avoid duplicate references. Now, we're a bit more selective when we decide to throw out a project or file reference: We check the file path and see if it ends with ".csproj".
- Loading branch information
1 parent
4a17dc9
commit 6d8813f
Showing
10 changed files
with
146 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
test-assets/test-projects/CSharpAndFSharp/CSharpAndFSharp.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.26124.0 | ||
MinimumVisualStudioVersion = 15.0.26124.0 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp-console", "csharp-console\csharp-console.csproj", "{ED247A90-AFBE-4717-8F32-AA8BFC2C8627}" | ||
EndProject | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "fsharp-lib", "fsharp-lib\fsharp-lib.fsproj", "{4FCFD6A3-2860-42C4-B98E-ADAEC268B928}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|Any CPU = Release|Any CPU | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{ED247A90-AFBE-4717-8F32-AA8BFC2C8627}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{ED247A90-AFBE-4717-8F32-AA8BFC2C8627}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{ED247A90-AFBE-4717-8F32-AA8BFC2C8627}.Debug|x64.ActiveCfg = Debug|x64 | ||
{ED247A90-AFBE-4717-8F32-AA8BFC2C8627}.Debug|x64.Build.0 = Debug|x64 | ||
{ED247A90-AFBE-4717-8F32-AA8BFC2C8627}.Debug|x86.ActiveCfg = Debug|x86 | ||
{ED247A90-AFBE-4717-8F32-AA8BFC2C8627}.Debug|x86.Build.0 = Debug|x86 | ||
{ED247A90-AFBE-4717-8F32-AA8BFC2C8627}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{ED247A90-AFBE-4717-8F32-AA8BFC2C8627}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{ED247A90-AFBE-4717-8F32-AA8BFC2C8627}.Release|x64.ActiveCfg = Release|x64 | ||
{ED247A90-AFBE-4717-8F32-AA8BFC2C8627}.Release|x64.Build.0 = Release|x64 | ||
{ED247A90-AFBE-4717-8F32-AA8BFC2C8627}.Release|x86.ActiveCfg = Release|x86 | ||
{ED247A90-AFBE-4717-8F32-AA8BFC2C8627}.Release|x86.Build.0 = Release|x86 | ||
{4FCFD6A3-2860-42C4-B98E-ADAEC268B928}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{4FCFD6A3-2860-42C4-B98E-ADAEC268B928}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{4FCFD6A3-2860-42C4-B98E-ADAEC268B928}.Debug|x64.ActiveCfg = Debug|x64 | ||
{4FCFD6A3-2860-42C4-B98E-ADAEC268B928}.Debug|x64.Build.0 = Debug|x64 | ||
{4FCFD6A3-2860-42C4-B98E-ADAEC268B928}.Debug|x86.ActiveCfg = Debug|x86 | ||
{4FCFD6A3-2860-42C4-B98E-ADAEC268B928}.Debug|x86.Build.0 = Debug|x86 | ||
{4FCFD6A3-2860-42C4-B98E-ADAEC268B928}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{4FCFD6A3-2860-42C4-B98E-ADAEC268B928}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{4FCFD6A3-2860-42C4-B98E-ADAEC268B928}.Release|x64.ActiveCfg = Release|x64 | ||
{4FCFD6A3-2860-42C4-B98E-ADAEC268B928}.Release|x64.Build.0 = Release|x64 | ||
{4FCFD6A3-2860-42C4-B98E-ADAEC268B928}.Release|x86.ActiveCfg = Release|x86 | ||
{4FCFD6A3-2860-42C4-B98E-ADAEC268B928}.Release|x86.Build.0 = Release|x86 | ||
EndGlobalSection | ||
EndGlobal |
12 changes: 12 additions & 0 deletions
12
test-assets/test-projects/CSharpAndFSharp/csharp-console/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
|
||
namespace csharp_console | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
Console.WriteLine("Hello World!"); | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
test-assets/test-projects/CSharpAndFSharp/csharp-console/csharp-console.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\fsharp-lib\fsharp-lib.fsproj" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
</Project> |
5 changes: 5 additions & 0 deletions
5
test-assets/test-projects/CSharpAndFSharp/fsharp-lib/Library.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace lib | ||
|
||
module Say = | ||
let hello name = | ||
printfn "Hello %s" name |
11 changes: 11 additions & 0 deletions
11
test-assets/test-projects/CSharpAndFSharp/fsharp-lib/fsharp-lib.fsproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="Library.fs" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters