Skip to content

Commit

Permalink
修改API 发布配置
Browse files Browse the repository at this point in the history
  • Loading branch information
HenJigg committed Oct 22, 2021
1 parent b47d58e commit e962465
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
6 changes: 6 additions & 0 deletions MyToDo/MyToDo/MyToDo.Api/MyToDo.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@
<ProjectReference Include="..\MyToDo.Shared\MyToDo.Shared.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="to.db">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DeleteExistingFiles>False</DeleteExistingFiles>
<ExcludeApp_Data>False</ExcludeApp_Data>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>bin\Release\net5.0\publish\</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net5.0</TargetFramework>
<ProjectGuid>3c0b0591-b45a-4959-8065-aebc04550a6b</ProjectGuid>
<SelfContained>false</SelfContained>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
</PropertyGroup>
</Project>
6 changes: 3 additions & 3 deletions MyToDo/MyToDo/MyToDo.Api/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "MyToDo.Api v1"));
}

app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "MyToDo.Api v1"));
app.UseRouting();

app.UseAuthorization();

app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapSwagger();
});
}
}
Expand Down
3 changes: 2 additions & 1 deletion MyToDo/MyToDo/MyToDo/Views/MainView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
ItemsSource="{Binding MenuBars}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding NavigateCommand}" CommandParameter="{Binding ElementName=menuBar, Path=SelectedItem}" />
<i:InvokeCommandAction Command="{Binding NavigateCommand}"
CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ListBox}}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<ListBox.ItemTemplate>
Expand Down

0 comments on commit e962465

Please sign in to comment.