Skip to content
This repository was archived by the owner on Jul 14, 2024. It is now read-only.

ap0llo/repro-cake-nullable-reference-types-in-alias

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cake Issue when addin uses nullable reference types

Repro for cake-build/cake#4197

This repository reproduces an issue in Cake that ocurrs, when an addin enables nullable referency types.

If a nullable annotation is used in an Cake alias, that is imported into a Cake script, running the script fails with an error like

(3423,57): error CS0234: The type or namespace name 'NullableAttribute' does not exist in the namespace 'System.Runtime.CompilerServices' (are you missing an assembly reference?)
(3423,57): error CS0234: The type or namespace name 'Nullable' does not exist in the namespace 'System.Runtime.CompilerServices' (are you missing an assembly reference?)

Run the repro

Build the sample addin by running

dotnet build --configuration Debug "ExampleAddin/ExampleAddin.csproj"

Run the Cake script that uses the alias

cd "CakeScript"
dotnet tool restore 
dotnet cake

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages