Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fixed CompilationDependencyResolver for .NET 5.0 #591

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

Merged
merged 1 commit into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ public IEnumerable<CompilationDependency> GetDependencies(string targetDirectory
}

// On .Net Core, we need to fetch the compilation references for framework assemblies separately.
if (defaultTargetFramework.StartsWith("netcoreapp3", StringComparison.InvariantCultureIgnoreCase))
if (defaultTargetFramework.StartsWith("netcoreapp3", StringComparison.InvariantCultureIgnoreCase) ||
defaultTargetFramework.StartsWith("net5", StringComparison.InvariantCultureIgnoreCase))
{
var compilationreferences = _compilationReferenceReader.Read(projectFileInfo);
result.Add(new CompilationDependency("Microsoft.NETCore.App", "3.0", compilationreferences.Select(cr => cr.Path).ToArray(), Array.Empty<string>()));
result.Add(new CompilationDependency("Dotnet.Script.Default.Dependencies", "99.0", compilationreferences.Select(cr => cr.Path).ToArray(), Array.Empty<string>()));
}

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public IEnumerable<CompilationReference> Read(ProjectFileInfo projectFile)
{
File.Delete(referencePathsFile);
}
var exitCode = _commandRunner.Execute("dotnet", $"build \"{pathToCompilationProjectFile}\" /p:OutputType=Library -o {outputDirectory}", workingDirectory);
var exitCode = _commandRunner.Execute("dotnet", $"build \"{pathToCompilationProjectFile}\" /p:OutputType=Library -o {outputDirectory} --nologo", workingDirectory);
if (exitCode != 0)
{
throw new Exception($"Unable to read compilation dependencies for '{projectFile.Path}'. Make sure that all script files contains valid NuGet references");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<RepositoryUrl>https://github.com/filipw/dotnet-script.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>script;csx;csharp;roslyn;omnisharp</PackageTags>
<Version>1.0.1</Version>
<Version>1.0.2</Version>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.