with one click
build-and-test
// Build DAX Studio and run tests. Use when you need to verify changes compile correctly and all tests pass.
// Build DAX Studio and run tests. Use when you need to verify changes compile correctly and all tests pass.
| name | build-and-test |
| description | Build DAX Studio and run tests. Use when you need to verify changes compile correctly and all tests pass. |
DaxStudio.exe process before building — it locks DLLs in src\bin\Debug\ and causes MSBuild copy failures.msbuild src\DaxStudio.sln /p:Configuration=Debug /restore
The MSBuild path may need to be fully qualified:
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe" src\DaxStudio.sln /p:Configuration=Debug /restore
vstest.console src\bin\Debug\DaxStudio.Tests.dll
Or for a single test:
vstest.console src\bin\Debug\DaxStudio.Tests.dll /Tests:TestMethodName
DaxStudio.UI and several other projects use old-style .csproj files (not SDK-style). When adding files:
.cs file: Add a <Compile Include="Path\To\File.cs" /> entry to the .csproj<EmbeddedResource Include="Path\To\File.resx" /> entry.resx with designer: Also add a <Compile Include="Path\To\File.Designer.cs" /> with <DependentUpon>File.resx</DependentUpon>Forgetting these entries means the file compiles locally in Visual Studio (which auto-includes) but fails on the build server.
| Error | Cause | Fix |
|---|---|---|
Unable to copy file ... being used by another process | DaxStudio.exe is running | Close DaxStudio before building |
The type or namespace 'X' could not be found | Missing <Compile Include> in .csproj | Add the file reference to the project file |
Resource file not found | Missing <EmbeddedResource Include> | Add the resource reference to the project file |
Step-by-step procedure for extracting hardcoded English strings from DAX Studio C# files and replacing them with resource references. Use when localizing ViewModels, services, or other C# code.
Procedure for migrating DAX Studio OptionsViewModel attributes ([DisplayName], [Description], [Category], [Subcategory]) to their localized equivalents. Use when localizing the Options UI.
Procedure for generating translations for DAX Studio resource files. Use when creating or updating translations for target languages (es, fr, de, zh-Hans, ja).
Procedure for localizing Spectre.Console.Cli command and option descriptions in DaxStudio.CommandLine. Use when internationalizing the dscmd command-line tool.
Step-by-step procedure for extracting hardcoded English strings from a DAX Studio XAML view file and replacing them with {x:Static} resource references. Use when localizing or internationalizing XAML files.