我有一个.NetCore 2应用程序,从Visual Studio启动时工作正常。
我花了几天试图发布它,我已经阅读了我发现的所有在线文档但没有运气。
当我访问localhost时,屏幕显示为白色,所有图像和样式都会消失。相反,HTML就在那里,但是对数据库的一些访问也不起作用。
我认为添加文件夹存在问题,因为它不会导出Views文件夹或Moderls。只是.Core通常的DLL文件。它包含一些带有应用程序名称的dll和precompiledviews.dll。
Webconfig文件很简单
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\ApplicationName.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
Visual Studio正在从.csproj中删除视图
<ItemGroup>
<None Include="Views\Clients\Create\partials\Form.cshtml" />
<None Include="Views\Clients\Edit\partials\PasswordForm.cshtml" />
<None Include="Views\Clients\Edit\partials\Form.cshtml" />
<None Include="Views\Devices\Edit\partials\Form.cshtml" />
<None Include="Views\Experts\Create\partials\Form.cshtml" />
<None Include="Views\Experts\Edit\partials\Form.cshtml" />
<None Include="Views\Experts\Edit\partials\PasswordForm.cshtml" />
<None Include="Views\Profile\Client\partials\ClientForm.cshtml" />
<None Include="Views\Profile\Client\partials\ClientPasswordForm.cshtml" />
<None Include="Views\Profile\User\partials\UserForm.cshtml" />
<None Include="Views\Profile\User\partials\UserPasswordForm.cshtml" />
<None Include="Views\Users\Create\partials\Form.cshtml" />
<None Include="Views\Users\Edit\partials\Form.cshtml" />
<None Include="Views\Users\Edit\partials\PasswordForm.cshtml" />
</ItemGroup>
但如果我改变了#34;没有&#34;与&#34;内容&#34;我无法编译,因为有一条错误消息说它们是重复的。我想它们会被添加到dll文件中。
你知道我能错过什么吗?
非常感谢