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

Update project templates to work with safe characters #2368

Merged
merged 9 commits into from
Sep 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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,7 +11,7 @@
"language": "C#",
"type": "solution"
},
"sourceName": "MauiApp1",
"sourceName": "MauiApp.1",
"sources": [
{
"source": "./",
Expand All @@ -37,7 +37,7 @@
"type": "parameter",
"description": "Overrides the $(ApplicationId) in the project",
"datatype": "string",
"replaces": "com.companyname.MauiApp1"
"replaces": "com.companyname.MauiApp.1"
},
"windowsAppSdkVersion": {
"type": "parameter",
Expand Down
4 changes: 2 additions & 2 deletions src/Templates/src/templates/maui-blazor/App.xaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:windows="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific;assembly=Microsoft.Maui.Controls"
xmlns:local="clr-namespace:MauiApp1"
x:Class="MauiApp1.App"
xmlns:local="clr-namespace:MauiApp._1"
x:Class="MauiApp._1.App"
windows:Application.ImageDirectory="Assets">
<Application.Resources>
<ResourceDictionary>
Expand Down
2 changes: 1 addition & 1 deletion src/Templates/src/templates/maui-blazor/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific;
using Application = Microsoft.Maui.Controls.Application;

namespace MauiApp1
namespace MauiApp._1
{
public partial class App : Application
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace MauiApp1.Data
namespace MauiApp._1.Data
{
public class WeatherForecast
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Linq;
using System.Threading.Tasks;

namespace MauiApp1.Data
namespace MauiApp._1.Data
{
public class WeatherForecastService
{
Expand Down
4 changes: 2 additions & 2 deletions src/Templates/src/templates/maui-blazor/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:b="clr-namespace:Microsoft.AspNetCore.Components.WebView.Maui;assembly=Microsoft.AspNetCore.Components.WebView.Maui"
xmlns:local="clr-namespace:MauiApp1"
x:Class="MauiApp1.MainPage"
xmlns:local="clr-namespace:MauiApp._1"
x:Class="MauiApp._1.MainPage"
BackgroundColor="{DynamicResource PageBackgroundColor}">

<b:BlazorWebView HostPage="wwwroot/index.html">
Expand Down
2 changes: 1 addition & 1 deletion src/Templates/src/templates/maui-blazor/MainPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Microsoft.Maui.Controls;

namespace MauiApp1
namespace MauiApp._1
{
public partial class MainPage : ContentPage
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net6.0-ios;net6.0-android;net6.0-maccatalyst</TargetFrameworks>
<!-- <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net6.0-windows10.0.19041</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>MauiApp1</RootNamespace>
<RootNamespace>MauiApp._1</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
Expand All @@ -13,7 +13,7 @@
<ApplicationTitle>MauiApp1</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.companyname.MauiApp1</ApplicationId>
<ApplicationId>com.companyname.MauiApp._1</ApplicationId>

<!-- Versions -->
<ApplicationVersion>1.0</ApplicationVersion>
Expand Down Expand Up @@ -51,7 +51,7 @@

<PropertyGroup>
<!-- Required - WinUI can't deploy in a multi-targeting environment -->
<AppxPackageRecipe>bin\$(Configuration)\net6.0-windows10.0.19041\win-x64\MauiApp1.build.appxrecipe</AppxPackageRecipe>
<AppxPackageRecipe>bin\$(Configuration)\net6.0-windows10.0.19041\win-x64\MauiApp._1.build.appxrecipe</AppxPackageRecipe>
Eilon marked this conversation as resolved.
Show resolved Hide resolved
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-windows'))">win-x64</RuntimeIdentifier>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31611.283
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiApp1", "MauiApp1.csproj", "{07CD65EF-6238-4365-AF5D-F6D433967F48}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiApp.1", "MauiApp.1.csproj", "{07CD65EF-6238-4365-AF5D-F6D433967F48}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
4 changes: 2 additions & 2 deletions src/Templates/src/templates/maui-blazor/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using Microsoft.Maui.Hosting;
using Microsoft.Maui.Controls.Compatibility;
using Microsoft.Maui.Controls.Hosting;
using MauiApp1.Data;
using MauiApp._1.Data;

namespace MauiApp1
namespace MauiApp._1
{
public static class MauiProgram
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@page "/fetchdata"

@using MauiApp1.Data
@using MauiApp.1.Data
@inject WeatherForecastService ForecastService

<h1>Weather forecast</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Android.Content.PM;
using Microsoft.Maui;

namespace MauiApp1
namespace MauiApp._1
{
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)]
public class MainActivity : MauiAppCompatActivity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Android.Runtime;
using Microsoft.Maui;

namespace MauiApp1
namespace MauiApp._1
{
[Application]
public class MainApplication : MauiApplication
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Foundation;
using Microsoft.Maui;

namespace MauiApp1
namespace MauiApp._1
{
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using UIKit;

namespace MauiApp1
namespace MauiApp._1
{
public class Program
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<maui:MauiWinUIApplication
x:Class="MauiApp1.WinUI.App"
x:Class="MauiApp._1.WinUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maui="using:Microsoft.Maui"
xmlns:local="using:MauiApp1.WinUI">
xmlns:local="using:MauiApp._1.WinUI">

</maui:MauiWinUIApplication>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.

namespace MauiApp1.WinUI
namespace MauiApp._1.WinUI
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Version="1.0.0.0" />

<Properties>
<DisplayName>MauiApp1</DisplayName>
<DisplayName>MauiApp.1</DisplayName>
<PublisherDisplayName>Microsoft</PublisherDisplayName>
<Logo>Assets\appiconStoreLogo.png</Logo>
</Properties>
Expand All @@ -31,16 +31,16 @@
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="MauiApp1"
Description="MauiApp1"
DisplayName="MauiApp.1"
Description="MauiApp.1"
BackgroundColor="transparent"
Square150x150Logo="Assets\appiconMediumTile.png"
Square44x44Logo="Assets\appiconLogo.png">
<uap:DefaultTile
Wide310x150Logo="Assets\appiconWideTile.png"
Square71x71Logo="Assets\appiconSmallTile.png"
Square310x310Logo="Assets\appiconLargeTile.png"
ShortName="MauiApp1">
ShortName="MauiApp.1">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo"/>
<uap:ShowOn Tile="wide310x150Logo"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MauiApp1.WinUI.app"/>
<assemblyIdentity version="1.0.0.0" name="MauiApp.1.WinUI.app"/>

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Foundation;
using Microsoft.Maui;

namespace MauiApp1
namespace MauiApp._1
{
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using UIKit;

namespace MauiApp1
namespace MauiApp._1
{
public class Program
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="top-row pl-4 navbar navbar-dark">
<a class="navbar-brand" href="">MauiApp1</a>
<a class="navbar-brand" href="">MauiApp.1</a>
<button class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
Expand Down
4 changes: 2 additions & 2 deletions src/Templates/src/templates/maui-blazor/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using MauiApp1
@using MauiApp1.Shared
@using MauiApp.1
@using MauiApp.1.Shared
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>MauiApp1</title>
<title>MauiApp.1</title>
<base href="/" />
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
<link href="css/app.css" rel="stylesheet" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"language": "C#",
"type": "solution"
},
"sourceName": "MauiApp1",
"sourceName": "MauiApp.1",
"sources": [
{
"source": "./",
Expand All @@ -37,7 +37,7 @@
"type": "parameter",
"description": "Overrides the $(ApplicationId) in the project",
"datatype": "string",
"replaces": "com.companyname.MauiApp1"
"replaces": "com.companyname.MauiApp.1"
},
"windowsAppSdkVersion": {
"type": "parameter",
Expand Down
4 changes: 2 additions & 2 deletions src/Templates/src/templates/maui-mobile/App.xaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:windows="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific;assembly=Microsoft.Maui.Controls"
xmlns:local="clr-namespace:MauiApp1"
x:Class="MauiApp1.App"
xmlns:local="clr-namespace:MauiApp._1"
x:Class="MauiApp._1.App"
windows:Application.ImageDirectory="Assets">
<Application.Resources>
<ResourceDictionary>
Expand Down
2 changes: 1 addition & 1 deletion src/Templates/src/templates/maui-mobile/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific;
using Application = Microsoft.Maui.Controls.Application;

namespace MauiApp1
namespace MauiApp._1
{
public partial class App : Application
{
Expand Down
2 changes: 1 addition & 1 deletion src/Templates/src/templates/maui-mobile/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiApp1.MainPage"
x:Class="MauiApp._1.MainPage"
BackgroundColor="{DynamicResource SecondaryColor}">

<ScrollView Padding="{OnPlatform iOS='30,60,30,30', Default='30'}">
Expand Down
2 changes: 1 addition & 1 deletion src/Templates/src/templates/maui-mobile/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Microsoft.Maui.Controls;
using Microsoft.Maui.Essentials;

namespace MauiApp1
namespace MauiApp._1
{
public partial class MainPage : ContentPage
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net6.0-ios;net6.0-android;net6.0-maccatalyst</TargetFrameworks>
<!-- <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net6.0-windows10.0.19041</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>MauiApp1</RootNamespace>
<RootNamespace>MauiApp._1</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
Expand All @@ -13,7 +13,7 @@
<ApplicationTitle>MauiApp1</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.companyname.MauiApp1</ApplicationId>
<ApplicationId>com.companyname.MauiApp._1</ApplicationId>

<!-- Versions -->
<ApplicationVersion>1.0</ApplicationVersion>
Expand Down Expand Up @@ -51,7 +51,7 @@

<PropertyGroup>
<!-- Required - WinUI can't deploy in a multi-targeting environment -->
<AppxPackageRecipe>bin\$(Configuration)\net6.0-windows10.0.19041\win-x64\MauiApp1.build.appxrecipe</AppxPackageRecipe>
<AppxPackageRecipe>bin\$(Configuration)\net6.0-windows10.0.19041\win-x64\MauiApp._1.build.appxrecipe</AppxPackageRecipe>
Eilon marked this conversation as resolved.
Show resolved Hide resolved
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-windows'))">win-x64</RuntimeIdentifier>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31611.283
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiApp1", "MauiApp1.csproj", "{07CD65EF-6238-4365-AF5D-F6D433967F48}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiApp.1", "MauiApp.1.csproj", "{07CD65EF-6238-4365-AF5D-F6D433967F48}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 1 addition & 1 deletion src/Templates/src/templates/maui-mobile/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.Maui.Controls.Compatibility;
using Microsoft.Maui.Controls.Hosting;

namespace MauiApp1
namespace MauiApp._1
{
public static class MauiProgram
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Android.Content.PM;
using Microsoft.Maui;

namespace MauiApp1
namespace MauiApp._1
{
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)]
public class MainActivity : MauiAppCompatActivity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Android.Runtime;
using Microsoft.Maui;

namespace MauiApp1
namespace MauiApp._1
{
[Application]
public class MainApplication : MauiApplication
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Foundation;
using Microsoft.Maui;

namespace MauiApp1
namespace MauiApp._1
{
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using UIKit;

namespace MauiApp1
namespace MauiApp._1
{
public class Program
{
Expand Down
Loading