ContextMenuManager icon indicating copy to clipboard operation
ContextMenuManager copied to clipboard

只需要分发一份.exe文件,和.exe.config 文件打包到一起即可

Open SadPencil opened this issue 4 years ago • 1 comments

只需要分发一份.exe文件,和.exe.config 文件打包到一起即可

https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/version-compatibility#Apps

By default, an app runs on the version of .NET Framework that it was built for. If that version isn't present and the app configuration file doesn't define supported versions, a .NET Framework initialization error may occur. In this case, the attempt to run the app will fail.

To define the specific versions on which your app runs, add one or more <supportedRuntime> elements to your app's configuration file. Each <supportedRuntime> element lists a supported version of the runtime, with the first specifying the most preferred version and the last specifying the least preferred version.

对于你的程序:

<configuration>
   <startup>
      <supportedRuntime version="v4.0" />
      <supportedRuntime version="v2.0.50727" />
   </startup>
</configuration>

SadPencil avatar Oct 03 '21 15:10 SadPencil

这个我是清楚的,我怕某些用户不清楚,比如直接压缩包内运行等操作,所以没这样做

BluePointLilac avatar Oct 04 '21 03:10 BluePointLilac