Skip to content
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
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "10.0.402",
"version": "11.0.100-rc.2.26504.105",
"rollForward": "latestPatch"
},
"test": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<OutputType>Exe</OutputType>
Expand All @@ -16,7 +16,7 @@
<Analyzer Include="../DimensionalQuantities/bin/$(Configuration)/netstandard2.0/DimensionalQuantities.dll" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="18.9.6" ExcludeAssets="runtime" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build" Version="18.10.1" ExcludeAssets="runtime" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Locator" Version="1.11.2" />
<PackageReference Include="MSBuild.ProjectCreation" Version="20.0.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static double MultiplyVoltageCurrent(double volts, double amps)
}
""");
ProjectCreator creator = ProjectCreator.Templates.SdkCsproj(path: consumerProject, targetFramework: "netstandard2.0")
.Property("LangVersion", "14.0")
.Property("LangVersion", "preview")
.ItemPackageReference(package)
.Save();

Expand Down Expand Up @@ -174,7 +174,7 @@ private ProjectCreator CreateProject(string name, string source, params Package[
Directory.CreateDirectory(directory);
File.WriteAllText(Path.Combine(directory, name + ".cs"), source);
ProjectCreator creator = ProjectCreator.Templates.SdkCsproj(path: Path.Combine(directory, name + ".csproj"), targetFramework: "netstandard2.0")
.Property("LangVersion", "14.0")
.Property("LangVersion", "preview")
.Property("Version", "1.0.0")
.Property("PackageOutputPath", Path.Combine(directory, "packages"))
.Property("CopyLocalLockFileAssemblies", "true");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<OutputType>Exe</OutputType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace DimensionalQuantities.Roslyn.Tests.Discovery;

public sealed class ArithmeticDiscoveryTests
{
private static readonly CSharpParseOptions _parseOptions = new(LanguageVersion.CSharp14);
private static readonly CSharpParseOptions _parseOptions = new(LanguageVersion.Preview);

[Theory]
[InlineData("length * time", true)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private static CSharpCompilation Compile(string source)
string[] assemblies = ((string)AppContext.GetData("TRUSTED_PLATFORM_ASSEMBLIES")!).Split(Path.PathSeparator);
IEnumerable<PortableExecutableReference> references = assemblies.Select(path => MetadataReference.CreateFromFile(path))
.Append(MetadataReference.CreateFromFile(typeof(Quantity<>).Assembly.Location));
return CSharpCompilation.Create("EnglishExponentConsumer", [CSharpSyntaxTree.ParseText(source, new CSharpParseOptions(LanguageVersion.CSharp14))],
return CSharpCompilation.Create("EnglishExponentConsumer", [CSharpSyntaxTree.ParseText(source, new CSharpParseOptions(LanguageVersion.Preview))],
references, new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static class Library
string[] platformAssemblies = ((string)AppContext.GetData("TRUSTED_PLATFORM_ASSEMBLIES")!).Split(Path.PathSeparator);
MetadataReference[] references = platformAssemblies.Select(path => MetadataReference.CreateFromFile(path))
.Append(MetadataReference.CreateFromFile(typeof(Quantity<>).Assembly.Location)).ToArray();
CSharpParseOptions options = new(LanguageVersion.CSharp14);
CSharpParseOptions options = new(LanguageVersion.Preview);
CSharpCompilation library = CSharpCompilation.Create("MetadataLibrary", [CSharpSyntaxTree.ParseText(librarySource, options)], references,
new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));
using MemoryStream stream = new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private static CSharpCompilation Compile(string source)
string[] assemblies = ((string)AppContext.GetData("TRUSTED_PLATFORM_ASSEMBLIES")!).Split(Path.PathSeparator);
IEnumerable<PortableExecutableReference> references = assemblies.Select(path => MetadataReference.CreateFromFile(path))
.Append(MetadataReference.CreateFromFile(typeof(Quantity<>).Assembly.Location));
return CSharpCompilation.Create("PowerDiscoveryConsumer", [CSharpSyntaxTree.ParseText(source, new CSharpParseOptions(LanguageVersion.CSharp14))],
return CSharpCompilation.Create("PowerDiscoveryConsumer", [CSharpSyntaxTree.ParseText(source, new CSharpParseOptions(LanguageVersion.Preview))],
references, new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private static CSharpCompilation Compile(string source)
IEnumerable<PortableExecutableReference> references = assemblies.Select(path => MetadataReference.CreateFromFile(path))
.Append(MetadataReference.CreateFromFile(typeof(Quantity<>).Assembly.Location));
return CSharpCompilation.Create("PowerMethodConsumer",
[CSharpSyntaxTree.ParseText(source, new CSharpParseOptions(LanguageVersion.CSharp14), cancellationToken: TestContext.Current.CancellationToken)],
[CSharpSyntaxTree.ParseText(source, new CSharpParseOptions(LanguageVersion.Preview), cancellationToken: TestContext.Current.CancellationToken)],
references, new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));
}
}
Loading
Loading