dotnet / dotnet/msbuild

%(Filename) includes extension for XAML files

Open
#2,689 3 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

I am trying to nest my ViewModels under my XAML files using the following naming convention `PageNameViewModel.cs`

I was trying to create the nesting by using this:

``

The problem I am facing is that the %(Filename) variable includes the `.xaml` extension (MainPage.xaml), which according to the documentation, it shouldn't. (https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-well-known-item-metadata)

This means that my statements are the same as:

``

Obviously, this is not what I am wanting to achieve. How can I get just the file name and not include the XAML extension?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.