Skip to content
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

chore: Restore HR tests #19263

Merged
merged 3 commits into from
Jan 23, 2025
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 @@ -11,11 +11,6 @@ public class Given_HotReloadService
{
[TestMethod]
[DynamicData(nameof(GetScenarios), DynamicDataSourceType.Method)]
// Failed HR Uno.UI.SourceGenerators.Tests.MetadataUpdateTests.Given_HotReloadService.HR
// Assert.AreEqual failed.
// Expected:<0>. Actual:<1>.
// Diagnostics: warning CS1701: Assuming assembly reference 'System.ObjectModel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'Uno.UI' matches identity 'System.ObjectModel, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.ObjectModel', you may need to supply runtime policy, expected
[Ignore("Needs investigation - tracked by https://github.com/unoplatform/uno/issues/19255")]
public async Task HR(string name, Scenario? scenario, Project[]? projects)
{
if (scenario != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,21 +223,22 @@ public async Task Initialize(CancellationToken ct)
foreach (var projectName in EnumerateProjects())
{
var projectInfo = ProjectInfo.Create(
ProjectId.CreateNewId(),
VersionStamp.Default,
name: projectName,
assemblyName: projectName,
language: LanguageNames.CSharp,
filePath: Path.Combine(_baseWorkFolder, projectName + ".csproj"),
outputFilePath: _baseWorkFolder,
metadataReferences: references,
compilationOptions: new CSharpCompilationOptions(
OutputKind.DynamicallyLinkedLibrary,
optimizationLevel: OptimizationLevel.Debug,
allowUnsafe: true,
nullableContextOptions: NullableContextOptions.Enable,
assemblyIdentityComparer: DesktopAssemblyIdentityComparer.Default),
analyzerReferences: [generatorReference]);
ProjectId.CreateNewId(),
VersionStamp.Default,
name: projectName,
assemblyName: projectName,
language: LanguageNames.CSharp,
filePath: Path.Combine(_baseWorkFolder, projectName + ".csproj"),
outputFilePath: _baseWorkFolder,
metadataReferences: references,
compilationOptions: new CSharpCompilationOptions(
OutputKind.DynamicallyLinkedLibrary,
optimizationLevel: OptimizationLevel.Debug,
allowUnsafe: true,
nullableContextOptions: NullableContextOptions.Enable,
assemblyIdentityComparer: DesktopAssemblyIdentityComparer.Default)
.WithSpecificDiagnosticOptions([new("CS1701", ReportDiagnostic.Suppress)]), // Assuming assembly reference 'System.ObjectModel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'Uno.UI' matches identity 'System.ObjectModel, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.ObjectModel', you may need to supply runtime policy, expected
analyzerReferences: [generatorReference]);

projectInfo = projectInfo
.WithCompilationOutputInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,11 @@

<Target Name="InjectRemoteControlHost"
BeforeTargets="BeforeBuild"
Condition="exists('$(IntermediateOutputPath)\RemoteControlHost.config') and '$(BuildingInsideVisualStudio)'!='true'">

<ItemGroup>
<WasmShellMonoEnvironment Include="DOTNET_MODIFIABLE_ASSEMBLIES" Value="debug" />
</ItemGroup>

<ReadLinesFromFile File="$(IntermediateOutputPath)\RemoteControlHost.config" >
<Output TaskParameter="Lines" ItemName="_RemoteControlHostContent"/>
</ReadLinesFromFile>

<ItemGroup>
<FileWrites Include="$(IntermediateOutputPath)\RemoteControlHost.config" />
</ItemGroup>

<CreateProperty
Value="@(_RemoteControlHostContent)">
<Output
TaskParameter="Value"
PropertyName="UnoRemoteControlHost" />
</CreateProperty>
Condition="exists('$(IntermediateOutputPath)\RemoteControlHost.config') and '$(BuildingInsideVisualStudio)'!='true' and '$(Configuration)'=='Debug'">

<Warning
Text="The version of uno's extension installed on your IDE is obsolete, please update to the latest version.
If error persists, try to delete obj folder and rebuild your solution." />
</Target>

</Project>
Loading