### Motivation and Context
**Why is this change required? What problem does it solve?** Consistent
developer experience across platforms.
**What scenario does it contribute to?** Developing the .NET solution on
Windows.
### Description
Steps to reproduce (assuming a Windows host and `main` being at
f159a0dfa0, which was the case at the time
of opening this PR):
git clone https://github.com/microsoft/semantic-kernel.git
cd semantic-kernel
git checkout f159a0dfa0
.\dotnet\build.cmd
Expected the build to succeed, but instead the output is:
MSBuild version 17.7.3+8ec440e68 for .NET
MSBUILD : error MSB1003: Specify a project or solution file. The current
working directory does not contain a project or solution file.
MSBUILD : error MSB1003: Specify a project or solution file. The current
working directory does not contain a project or solution file.
The PR fixes the problem by updating `build.cmd` to be consistent with
`build.sh` in two ways:
- The script changes the current directory to the .NET solution root
- Tests are run via `build test` if the solution builds successfully via
`dotnet build`. This is done via `&&`.
The PR also updates `.gitattributes` to make sure that `*.cmd` files use
the `CRLF`, as is conventional for EOL on Windows.
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
### Other Information
`dotnet --info` says:
.NET SDK:
Version: 7.0.401
Commit: eb26aacfec
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.401\
Host:
Version: 7.0.11
Architecture: x64
Commit: ecb34f85ec
.NET SDKs installed:
3.1.426 [C:\Program Files\dotnet\sdk]
5.0.416 [C:\Program Files\dotnet\sdk]
6.0.414 [C:\Program Files\dotnet\sdk]
7.0.203 [C:\Program Files\dotnet\sdk]
7.0.401 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.22 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.5 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.11 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program
Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program
Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.22 [C:\Program
Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.5 [C:\Program
Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.11 [C:\Program
Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.22 [C:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.5 [C:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.11 [C:\Program
Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at
[HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Co-authored-by: Shawn Callegari <[email protected]>
We are already in the dotnet folder, no need to cd again, as there is no
dotnet folder inside the dotnet folder!
Found this while I was building a repo for the first time!
BTW any specific reason we are running tests when building a repo for
the first time!?
Cleaning up repo root folder:
- `build.sh` and `build.cmd` move to the `dotnet/` folder, since they're
only responsible for building the dotnet SDK
- Remove `compliance.yml` -- this is an Azure DevOps pipeline definition
and need not be implemented here in the GitHub repo
---------
Co-authored-by: Dmytro Struk <[email protected]>