diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..04075c0 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,51 @@ +name: build + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + + runs-on: windows-latest + + env: + Configuration: Release + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 6.0.x + + - name: Restore dependencies + run: dotnet restore + working-directory: ./src + + - name: Build + run: dotnet build --no-restore --configuration $env:Configuration + working-directory: ./src + + - name: Test + run: dotnet test --no-build --configuration $env:Configuration --verbosity normal + working-directory: ./src + + # Unfortunately, --no-build does not seem to work when we publish a specific project, so we use --no-restore instead + # Skip adding a web.config for IIS, as we will always use Kestrel (IsTransformWebConfigDisabled=true) + - name: Publish + run: dotnet publish FlaUI.WebDriver/FlaUI.WebDriver.csproj --no-restore --configuration $env:Configuration --self-contained /p:IsTransformWebConfigDisabled=true + working-directory: ./src + + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: FlaUI.WebDriver + path: ./src/FlaUI.WebDriver/bin/Release/win-x64/publish diff --git a/README.md b/README.md index 7a61bad..d016d2c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # FlaUI.WebDriver +[![build](https://github.com/FlaUI/FlaUI.WebDriver/actions/workflows/build.yml/badge.svg)](https://github.com/FlaUI/FlaUI.WebDriver/actions/workflows/build.yml) + FlaUI.WebDriver is a [W3C WebDriver2](https://www.w3.org/TR/webdriver2/) implementation using FlaUI's automation. It currently only supports UIA3. > [!IMPORTANT] diff --git a/src/FlaUI.WebDriver.UITests/ElementTests.cs b/src/FlaUI.WebDriver.UITests/ElementTests.cs index da647cb..7088640 100644 --- a/src/FlaUI.WebDriver.UITests/ElementTests.cs +++ b/src/FlaUI.WebDriver.UITests/ElementTests.cs @@ -142,8 +142,8 @@ public void GetElementRect_Default_IsSupported() var size = element.Size; var windowLocation = driver.Manage().Window.Position; - Assert.That(location.X, Is.InRange(windowLocation.X + 254, windowLocation.X + 256)); - Assert.That(location.Y, Is.InRange(windowLocation.Y + 133, windowLocation.Y + 135)); + Assert.That(location.X, Is.InRange(windowLocation.X + 253, windowLocation.X + 257)); + Assert.That(location.Y, Is.InRange(windowLocation.Y + 132, windowLocation.Y + 136)); Assert.That(size.Width, Is.EqualTo(120)); Assert.That(size.Height, Is.EqualTo(22)); } diff --git a/src/FlaUI.WebDriver.UITests/FlaUI.WebDriver.UITests.csproj b/src/FlaUI.WebDriver.UITests/FlaUI.WebDriver.UITests.csproj index 8f8563b..8206e73 100644 --- a/src/FlaUI.WebDriver.UITests/FlaUI.WebDriver.UITests.csproj +++ b/src/FlaUI.WebDriver.UITests/FlaUI.WebDriver.UITests.csproj @@ -18,4 +18,9 @@ + + + + + diff --git a/src/FlaUI.WebDriver.UITests/TestUtil/FlaUIDriverOptions.cs b/src/FlaUI.WebDriver.UITests/TestUtil/FlaUIDriverOptions.cs index 8767f5b..e4421bc 100644 --- a/src/FlaUI.WebDriver.UITests/TestUtil/FlaUIDriverOptions.cs +++ b/src/FlaUI.WebDriver.UITests/TestUtil/FlaUIDriverOptions.cs @@ -5,14 +5,12 @@ namespace FlaUI.WebDriver.UITests.TestUtil { internal class FlaUIDriverOptions : DriverOptions { - public const string TestAppPath = "..\\..\\..\\TestApplications\\WpfApplication\\bin\\WpfApplication.exe"; - public override ICapabilities ToCapabilities() { return GenerateDesiredCapabilities(true); } - public static FlaUIDriverOptions TestApp() => App(TestAppPath); + public static FlaUIDriverOptions TestApp() => App(TestApplication.FullPath); public static DriverOptions RootApp() => App("Root"); diff --git a/src/FlaUI.WebDriver.UITests/TestUtil/TestAppProcess.cs b/src/FlaUI.WebDriver.UITests/TestUtil/TestAppProcess.cs index 50411c5..1aad7b1 100644 --- a/src/FlaUI.WebDriver.UITests/TestUtil/TestAppProcess.cs +++ b/src/FlaUI.WebDriver.UITests/TestUtil/TestAppProcess.cs @@ -5,12 +5,11 @@ namespace FlaUI.WebDriver.UITests.TestUtil { public class TestAppProcess : IDisposable { - private const string TestAppPath = "..\\..\\..\\..\\TestApplications\\WpfApplication\\bin\\WpfApplication.exe"; private readonly Process _process; public TestAppProcess() { - _process = Process.Start(TestAppPath); + _process = Process.Start(TestApplication.FullPath); while (_process.MainWindowHandle == IntPtr.Zero) { System.Threading.Thread.Sleep(100); diff --git a/src/FlaUI.WebDriver.UITests/TestUtil/TestApplication.cs b/src/FlaUI.WebDriver.UITests/TestUtil/TestApplication.cs new file mode 100644 index 0000000..16e1171 --- /dev/null +++ b/src/FlaUI.WebDriver.UITests/TestUtil/TestApplication.cs @@ -0,0 +1,9 @@ +using System.IO; + +namespace FlaUI.WebDriver.UITests.TestUtil +{ + public static class TestApplication + { + public static string FullPath => Path.GetFullPath("..\\..\\..\\..\\TestApplications\\WpfApplication\\bin\\Release\\WpfApplication.exe"); + } +} \ No newline at end of file diff --git a/src/FlaUI.WebDriver.UITests/WebDriverFixture.cs b/src/FlaUI.WebDriver.UITests/WebDriverFixture.cs index 59c62b7..e37eaca 100644 --- a/src/FlaUI.WebDriver.UITests/WebDriverFixture.cs +++ b/src/FlaUI.WebDriver.UITests/WebDriverFixture.cs @@ -9,7 +9,7 @@ namespace FlaUI.WebDriver.UITests [SetUpFixture] public class WebDriverFixture { - public static readonly Uri WebDriverUrl = new Uri("http://localhost:4723/"); + public static readonly Uri WebDriverUrl = new Uri("http://localhost:9723/"); private Process _webDriverProcess; diff --git a/src/FlaUI.WebDriver.sln b/src/FlaUI.WebDriver.sln index 4a9b0d1..9e76c41 100644 --- a/src/FlaUI.WebDriver.sln +++ b/src/FlaUI.WebDriver.sln @@ -7,37 +7,98 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{3DFE78D4 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestApplications", "TestApplications", "{00BCF82A-388A-4DC9-A1E2-6D6D983BAEE3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfApplication", "TestApplications\WpfApplication\WpfApplication.csproj", "{C8276299-FA43-409B-A969-EF030AB56224}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FlaUI.WebDriver", "FlaUI.WebDriver\FlaUI.WebDriver.csproj", "{07FE5EE9-0104-42CE-A79D-88FD7D79B542}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FlaUI.WebDriver.UITests", "FlaUI.WebDriver.UITests\FlaUI.WebDriver.UITests.csproj", "{5315D9CF-DDA4-49AE-BA92-AB5814E61901}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfApplication", "TestApplications\WpfApplication\WpfApplication.csproj", "{23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4F6F2546-27D9-468C-AD80-1629B54139DA}" + ProjectSection(SolutionItems) = preProject + ..\README.md = ..\README.md + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|ARM64 = Debug|ARM64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|ARM64 = Release|ARM64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C8276299-FA43-409B-A969-EF030AB56224}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C8276299-FA43-409B-A969-EF030AB56224}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C8276299-FA43-409B-A969-EF030AB56224}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C8276299-FA43-409B-A969-EF030AB56224}.Release|Any CPU.Build.0 = Release|Any CPU {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Debug|Any CPU.Build.0 = Debug|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Debug|ARM.ActiveCfg = Debug|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Debug|ARM.Build.0 = Debug|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Debug|ARM64.Build.0 = Debug|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Debug|x64.ActiveCfg = Debug|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Debug|x64.Build.0 = Debug|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Debug|x86.ActiveCfg = Debug|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Debug|x86.Build.0 = Debug|Any CPU {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Release|Any CPU.ActiveCfg = Release|Any CPU {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Release|Any CPU.Build.0 = Release|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Release|ARM.ActiveCfg = Release|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Release|ARM.Build.0 = Release|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Release|ARM64.ActiveCfg = Release|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Release|ARM64.Build.0 = Release|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Release|x64.ActiveCfg = Release|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Release|x64.Build.0 = Release|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Release|x86.ActiveCfg = Release|Any CPU + {07FE5EE9-0104-42CE-A79D-88FD7D79B542}.Release|x86.Build.0 = Release|Any CPU {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Debug|ARM.ActiveCfg = Debug|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Debug|ARM.Build.0 = Debug|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Debug|ARM64.Build.0 = Debug|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Debug|x64.ActiveCfg = Debug|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Debug|x64.Build.0 = Debug|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Debug|x86.ActiveCfg = Debug|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Debug|x86.Build.0 = Debug|Any CPU {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Release|Any CPU.ActiveCfg = Release|Any CPU {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Release|Any CPU.Build.0 = Release|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Release|ARM.ActiveCfg = Release|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Release|ARM.Build.0 = Release|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Release|ARM64.ActiveCfg = Release|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Release|ARM64.Build.0 = Release|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Release|x64.ActiveCfg = Release|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Release|x64.Build.0 = Release|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Release|x86.ActiveCfg = Release|Any CPU + {5315D9CF-DDA4-49AE-BA92-AB5814E61901}.Release|x86.Build.0 = Release|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Debug|ARM.ActiveCfg = Debug|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Debug|ARM.Build.0 = Debug|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Debug|ARM64.Build.0 = Debug|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Debug|x64.ActiveCfg = Debug|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Debug|x64.Build.0 = Debug|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Debug|x86.ActiveCfg = Debug|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Debug|x86.Build.0 = Debug|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Release|Any CPU.Build.0 = Release|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Release|ARM.ActiveCfg = Release|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Release|ARM.Build.0 = Release|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Release|ARM64.ActiveCfg = Release|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Release|ARM64.Build.0 = Release|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Release|x64.ActiveCfg = Release|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Release|x64.Build.0 = Release|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Release|x86.ActiveCfg = Release|Any CPU + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {C8276299-FA43-409B-A969-EF030AB56224} = {00BCF82A-388A-4DC9-A1E2-6D6D983BAEE3} {5315D9CF-DDA4-49AE-BA92-AB5814E61901} = {3DFE78D4-89EB-4CEE-A5D1-F5FDDED10959} + {23F0E331-C5AE-4D3D-B4E2-534D52E65CA0} = {00BCF82A-388A-4DC9-A1E2-6D6D983BAEE3} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F2B64231-45B2-4129-960A-9F26AFFD16AE} diff --git a/src/FlaUI.WebDriver/.config/dotnet-tools.json b/src/FlaUI.WebDriver/.config/dotnet-tools.json new file mode 100644 index 0000000..d9d129c --- /dev/null +++ b/src/FlaUI.WebDriver/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "8.0.3", + "commands": [ + "dotnet-ef" + ] + } + } +} \ No newline at end of file diff --git a/src/FlaUI.WebDriver/FlaUI.WebDriver.csproj b/src/FlaUI.WebDriver/FlaUI.WebDriver.csproj index 7b1209e..ff59d7e 100644 --- a/src/FlaUI.WebDriver/FlaUI.WebDriver.csproj +++ b/src/FlaUI.WebDriver/FlaUI.WebDriver.csproj @@ -3,9 +3,12 @@ net6.0-windows enable - disable + enable preview false + win-x64 + true + true @@ -13,4 +16,8 @@ + + + + diff --git a/src/FlaUI.WebDriver/Program.cs b/src/FlaUI.WebDriver/Program.cs index fc993b9..4ef1cd6 100644 --- a/src/FlaUI.WebDriver/Program.cs +++ b/src/FlaUI.WebDriver/Program.cs @@ -1,25 +1,31 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; -using System.IO; -using System.Reflection; +using FlaUI.WebDriver; +using Microsoft.OpenApi.Models; -namespace FlaUI.WebDriver +var builder = WebApplication.CreateBuilder(args); + +builder.Services.AddSingleton(); + +builder.Services.Configure(options => options.LowercaseUrls = true); +builder.Services.AddControllers(options => + options.Filters.Add(new WebDriverResponseExceptionFilter())); + +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(c => { - public class Program - { - public static void Main(string[] args) - { - string assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!; - Directory.SetCurrentDirectory(assemblyDir); - - CreateHostBuilder(args).Build().Run(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); - } + c.SwaggerDoc("v1", new OpenApiInfo { Title = "FlaUI.WebDriver", Version = "v1" }); +}); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "FlaUI.WebDriver v1")); } + +app.UseAuthorization(); + +app.MapControllers(); + +app.Run(); diff --git a/src/FlaUI.WebDriver/Startup.cs b/src/FlaUI.WebDriver/Startup.cs deleted file mode 100644 index 4262641..0000000 --- a/src/FlaUI.WebDriver/Startup.cs +++ /dev/null @@ -1,65 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Routing; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.OpenApi.Models; -using System; - -namespace FlaUI.WebDriver -{ - public class Startup - { - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddSingleton(); - - services.Configure(options => options.LowercaseUrls = true); - services.AddControllers(options => - options.Filters.Add(new WebDriverResponseExceptionFilter())); - services.AddSwaggerGen(c => - { - c.SwaggerDoc("v1", new OpenApiInfo { Title = "FlaUI.WebDriver", Version = "v1" }); - }); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseSwagger(); - app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "FlaUI.WebDriver v1")); - } - - app.Use(async (context, next) => - { - context.Response.GetTypedHeaders().CacheControl = - new Microsoft.Net.Http.Headers.CacheControlHeaderValue() - { - NoCache = true, - }; - await next(); - }); - - app.UseRouting(); - - app.UseAuthorization(); - - app.UseEndpoints(endpoints => - { - endpoints.MapControllers(); - }); - } - } -} diff --git a/src/TestApplications/WpfApplication/App.xaml b/src/TestApplications/WpfApplication/App.xaml index d7daf20..b509a5c 100644 --- a/src/TestApplications/WpfApplication/App.xaml +++ b/src/TestApplications/WpfApplication/App.xaml @@ -1,6 +1,7 @@  diff --git a/src/TestApplications/WpfApplication/App.xaml.cs b/src/TestApplications/WpfApplication/App.xaml.cs index 9f953e5..b803a33 100644 --- a/src/TestApplications/WpfApplication/App.xaml.cs +++ b/src/TestApplications/WpfApplication/App.xaml.cs @@ -1,9 +1,14 @@ -namespace WpfApplication +using System.Configuration; +using System.Data; +using System.Windows; + +namespace WpfApplication { /// /// Interaction logic for App.xaml /// - public partial class App + public partial class App : Application { } + } diff --git a/src/TestApplications/WpfApplication/AssemblyInfo.cs b/src/TestApplications/WpfApplication/AssemblyInfo.cs new file mode 100644 index 0000000..b0ec827 --- /dev/null +++ b/src/TestApplications/WpfApplication/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/src/TestApplications/WpfApplication/Properties/AssemblyInfo.cs b/src/TestApplications/WpfApplication/Properties/AssemblyInfo.cs deleted file mode 100644 index 7128d80..0000000 --- a/src/TestApplications/WpfApplication/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. - -[assembly: AssemblyTitle("WpfApplication")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("WpfApplication")] -[assembly: AssemblyCopyright("Copyright © 2016-2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. - -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) - )] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] - -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: AssemblyInformationalVersion("1.0.0.0")] diff --git a/src/TestApplications/WpfApplication/WpfApplication.csproj b/src/TestApplications/WpfApplication/WpfApplication.csproj index c0bea11..67cb170 100644 --- a/src/TestApplications/WpfApplication/WpfApplication.csproj +++ b/src/TestApplications/WpfApplication/WpfApplication.csproj @@ -1,125 +1,12 @@ - - - + + - Debug - AnyCPU - {C8276299-FA43-409B-A969-EF030AB56224} WinExe - Properties - WpfApplication - WpfApplication - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - true - - - - AnyCPU - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\ - TRACE - prompt - 4 - - - WPFApp.ico - - - - - - - - - - - - 4.0 - - - - - - - - MSBuild:Compile - Designer - - - Window1.xaml - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - - - - - - MainWindow.xaml - Code - - - Designer - MSBuild:Compile - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - - - - - \ No newline at end of file + net6.0-windows + disable + enable + true + false + + +