最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

vb.net - Problem with Application page doesn't appear in Project Visual Basic - Stack Overflow

programmeradmin1浏览0评论

I'm using Visual Studio 17.13.5 latest version and working with my project everything is good , suddenly I got for this error :

What I did for trying solve this problem :

1-Delete obj+bin folder and rebuild.
2-Changing   <HighDpiMode>false</HighDpiMode> in Application.myapp to true nothing helped.
3-Created a new project and copied the files and put in the new one.

Nothing helped me ! But I got some error also : Custom tool error: Failed to generate file: There is an error in XML document (11, 35).

So I'm confusing and can not find any solution !

I'm using Visual Studio 17.13.5 latest version and working with my project everything is good , suddenly I got for this error :

What I did for trying solve this problem :

1-Delete obj+bin folder and rebuild.
2-Changing   <HighDpiMode>false</HighDpiMode> in Application.myapp to true nothing helped.
3-Created a new project and copied the files and put in the new one.

Nothing helped me ! But I got some error also : Custom tool error: Failed to generate file: There is an error in XML document (11, 35).

So I'm confusing and can not find any solution !

Share Improve this question edited Apr 4 at 6:24 Jack J Jun- MSFT 5,9961 gold badge13 silver badges44 bronze badges asked Mar 28 at 14:22 mandarin softwaremandarin software 2371 silver badge11 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 3

If you set the High DPI mode via the project properties page (.NET Core 3.1+), you will see that the <HighDpiMode> entry takes numeric values between 0 and 4. There is a drop-down with available values.

E.g.:

<HighDpiMode>0</HighDpiMode>

There is a description of these modes in HighDpiMode Enum


First, delete the line <HighDpiMode>false</HighDpiMode>.

Then, in Visual Studio, right click on the VB Project in the Solution Explorer and search for the High DPI Mode:

Here you can select the desired mode and this will re-add the <HighDpiMode> line to the setting in a compatible way (and yes, it is a number, not a Boolean).


Update for .NET Framework 4.8

In a freshly created Windows Forms App using .NET Framework 4.8 my Application.myapp file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3./2001/XMLSchema-instance" xmlns:xsd="http://www.w3./2001/XMLSchema">
  <MySubMain>true</MySubMain>
  <MainForm>Form1</MainForm>
  <SingleInstance>false</SingleInstance>
  <ShutdownMode>0</ShutdownMode>
  <EnableVisualStyles>true</EnableVisualStyles>
  <AuthenticationMode>0</AuthenticationMode>
  <ApplicationType>0</ApplicationType>
  <SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

There is no HighDpiMode tag there. According to "High DPI support in Windows Forms" you can make changes to app.config.

发布评论

评论列表(0)

  1. 暂无评论