Skip to content

Commit

Permalink
Some of this will get removed again
Browse files Browse the repository at this point in the history
  • Loading branch information
lewing committed Jul 9, 2024
1 parent 4440cf5 commit c2c286d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions crates/csharp/src/csproj.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ impl CSProjectLLVMBuilder {
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RuntimeIdentifier>wasi-wasm</RuntimeIdentifier>
<OutputType>Library</OutputType>
</PropertyGroup>
<PropertyGroup>
Expand Down Expand Up @@ -133,6 +135,7 @@ impl CSProjectLLVMBuilder {
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
<add key="dotnet-experimental" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json" />
<!--<add key="dotnet-experimental" value="C:\github\runtimelab\artifacts\packages\Debug\Shipping" />-->
</packageSources>
Expand Down Expand Up @@ -192,7 +195,7 @@ impl CSProjectMonoBuilder {
};

let mut csproj = format!(
"<Project Sdk=\"Microsoft.NET.Sdk\">
"<Project Sdk=\"Microsoft.NET.Sdk.WebAssembly\">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
Expand All @@ -206,6 +209,7 @@ impl CSProjectMonoBuilder {
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<WasmGenerateAppBundle>true</WasmGenerateAppBundle>
</PropertyGroup>
<PropertyGroup>
Expand All @@ -214,9 +218,14 @@ impl CSProjectMonoBuilder {
</PropertyGroup>
<ItemGroup>
<NativeFileReference Include=\"{camel}_component_type.o\" Condition=\"Exists('{camel}_component_type.o')\"/>
<NativeLibrary Include=\"{camel}_component_type.o\" />
</ItemGroup>
<Target Name=\"_FixRootAssembly\" AfterTargets=\"PrepareForILLink\">
<ItemGroup>
<TrimmerRootAssembly Update=\"@(TrimmerRootAssembly)\" Condition=\" '%(RootMode)' == 'EntryPoint' \" RootMode=\"Library\" />
</ItemGroup>
</Target>
"
);

Expand Down
2 changes: 1 addition & 1 deletion tests/runtime/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ fn tests(name: &str, dir_name: &str) -> Result<Vec<PathBuf>> {
panic!("failed to compile");
}

let out_wasm = out_wasm.join(assembly_name);
//let out_wasm = out_wasm.join(assembly_name);
let mut wasm_filename = out_wasm.clone();
wasm_filename.set_extension("wasm");

Expand Down

0 comments on commit c2c286d

Please sign in to comment.