0

Currently I have a WinForm App (.NET Framework) that I am currently publishing to a local folder on my PC. It is creating an arm, arm64, musl-x64, x64, and an x86 folder. My target platform/CPU is set to x86 everywhere that I can change it in Visual Studio. The folders I don't want are all above 7MB in size, making the publish folder close to 80MB. However, when I delete them from the publish folder, the setup.exe won't run because it's looking for those folders. How can I only have it publish the x86? My target Framework version is v4.7.2. Below is in my csproj file:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
  <PlatformTarget>x86</PlatformTarget>
  <DebugSymbols>true</DebugSymbols>
  <DebugType>full</DebugType>
  <Optimize>false</Optimize>
  <OutputPath>bin\Debug\</OutputPath>
  <DefineConstants>DEBUG;TRACE</DefineConstants>
  <ErrorReport>prompt</ErrorReport>
  <WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
  <PlatformTarget>x86</PlatformTarget>
  <DebugType>pdbonly</DebugType>
  <Optimize>true</Optimize>
  <OutputPath>bin\Release\</OutputPath>
  <DefineConstants>TRACE</DefineConstants>
  <ErrorReport>prompt</ErrorReport>
  <WarningLevel>4</WarningLevel>
</PropertyGroup>

Folders in Publishing Folder

I have tried changing the target platform/CPU to x86 anywhere that it let me change it. The additional arm, arm64, musl-x64, and x64 are still showing up in the published folder.

8
  • .deploy is only used in ClickOnce applications, a very specific (and limited) kind of deployment. What you posted has nothing to do with ClickOnce. You need to find and modify the ClickOnce configuration. Commented Nov 26, 2024 at 13:11
  • @PanagiotisKanavos Thanks for the edit. Any idea what to modify in/where to modify the ClickOnce configuration? Commented Nov 26, 2024 at 13:17
  • How did you create that deployment to begin with? If you used the Publish wizard there may be related options you can change. In any case check Publish properties [Publish properties and Use ClickOnce to deploy applications that can run on multiple versions Commented Nov 26, 2024 at 13:20
  • I am utilizing the Publish wizard. There only things it asks for are 1) Where to publish it 2) How will users install the application and 3) Where to check for updates Commented Nov 26, 2024 at 13:29
  • You'll have to read the docs to find the relevant properties. As I said, this is a very limited deployment option and the wizard probably hasn't been updated in a decade. ClickOnce was meant to offer a quick-ish way to create installers for intranet applications that could autoupdate themselves from a central location. The files you complain about aren't supposed to be copied to user machines, they're supposed to be copied into a shared folder or uploaded to a web site. Users will install applications from there. The installers will check there for new versions Commented Nov 26, 2024 at 13:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.