Skip to content

Commit

Permalink
minor build
Browse files Browse the repository at this point in the history
  • Loading branch information
iJungleboy committed Dec 10, 2024
1 parent 61cb4a9 commit 5a9e91b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<h1 id="issues-building-oqtaneservercsproj-after-installing-2sxc-templates">Issues Building <code>Oqtane.Server.csproj</code> After Installing 2sxc Templates</h1>
<p>When developing with Oqtane in <strong>developer mode</strong>, you typically run <code>Oqtane.Server.csproj</code> by pressing <code>F5</code> in Visual Studio. This action builds the project and its dependencies before launching it on IIS Express (<code>localhost</code>). However, after installing 2sxc Content and App templates, you might encounter build failures when compiling <code>Oqtane.Server.csproj</code>.</p>
<h2 id="problem-overview">Problem Overview</h2>
<p>After adding 2sxc templates to your Oqtane project, the build process may fail with numerous errors—sometimes over 1,000—rendering Oqtane unusable in the development environment. This happens because Visual Studio includes all new files and folders added by the templates into the project build by default.</p>
<p><img src="../../../pages/abyss/platforms/oqtane/assets/oqtane-server-vs-build-errors.png" alt="exclude 2sxc folder"></p>
<p>After adding 2sxc templates to your Oqtane project, the Visual Studio build process may fail with numerous errors—sometimes over 1,000—rendering Oqtane unusable in the development environment.</p>
<p><img src="../../../pages/abyss/platforms/oqtane/assets/oqtane-server-vs-build-errors.png" alt="build errors in Oqtane.Server project"></p>
<h3 id="affected-folders">Affected Folders</h3>
<p>The problematic folder that cause the build issues is <code>2sxc</code>.</p>
<p>These directory contain assets for the 2sxc apps and templates. While these files are necessary for runtime, they are <strong>not</strong> meant to be compiled as part of the <code>Oqtane.Server</code> project.</p>
<p>These directory contain assets for the 2sxc apps and templates.</p>
<h2 id="solution-exclude-2sxc-folder-from-the-build">Solution: Exclude <code>2sxc</code> Folder from the Build</h2>
<p>To resolve the build errors, you need to exclude <code>2sxc</code> folder from the compilation process. This can be done by modifying the <code>Oqtane.Server.csproj</code> file to tell the compiler to ignore these directory.</p>
<h3 id="steps-to-exclude-folders">Steps to Exclude Folders</h3>
Expand Down Expand Up @@ -140,7 +140,7 @@ <h3 id="steps-to-exclude-folders">Steps to Exclude Folders</h3>
</li>
</ol>
<h2 id="why-this-happens">Why This Happens</h2>
<p>Visual Studio automatically includes new files and directories added to the project folder. The 2sxc templates introduce additional files that are necessary for the application to run but are <strong>not</strong> meant to be part of the compiled code. Including them causes conflicts and compilation errors because the compiler tries to process files that aren't valid C# code or are duplicates.</p>
<p>The 2sxc templates introduce additional files that are necessary for the application to run but are <strong>not</strong> meant to be part of the compiled code. Visual Studio automatically includes new files and directories added to the project folder. Including them causes conflicts and compilation errors because the compiler tries to process files that aren't valid C# code or are duplicates.</p>
<h2 id="summary">Summary</h2>
<p>By excluding the <code>2sxc</code> folder from the build process, you prevent the compiler from processing unnecessary files. This resolves the build errors and allows you to continue developing your Oqtane application with the 2sxc templates installed.</p>
<h2 id="related">Related</h2>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@
"abyss/platforms/oqtane/install-issue-build-oqtane-server.html": {
"href": "abyss/platforms/oqtane/install-issue-build-oqtane-server.html",
"title": "Issues Building Oqtane.Server.csproj After Installing 2sxc Templates | 2sxc 18 for Dnn and Oqtane",
"keywords": "Issues Building Oqtane.Server.csproj After Installing 2sxc Templates When developing with Oqtane in developer mode, you typically run Oqtane.Server.csproj by pressing F5 in Visual Studio. This action builds the project and its dependencies before launching it on IIS Express (localhost). However, after installing 2sxc Content and App templates, you might encounter build failures when compiling Oqtane.Server.csproj. Problem Overview After adding 2sxc templates to your Oqtane project, the build process may fail with numerous errors—sometimes over 1,000—rendering Oqtane unusable in the development environment. This happens because Visual Studio includes all new files and folders added by the templates into the project build by default. Affected Folders The problematic folder that cause the build issues is 2sxc. These directory contain assets for the 2sxc apps and templates. While these files are necessary for runtime, they are not meant to be compiled as part of the Oqtane.Server project. Solution: Exclude 2sxc Folder from the Build To resolve the build errors, you need to exclude 2sxc folder from the compilation process. This can be done by modifying the Oqtane.Server.csproj file to tell the compiler to ignore these directory. Steps to Exclude Folders Open Oqtane.Server.csproj: Locate the Oqtane.Server.csproj file in your project directory and open it with a text editor or within Visual Studio. Add Exclusion Rules: Insert the following <ItemGroup> section into the project file: <ItemGroup> <!-- Exclude these directories from compilation --> <Compile Remove=\"2sxc\\**\" /> <!-- Exclude content files from the build output --> <Content Remove=\"2sxc\\**\" /> <!-- Exclude files from being embedded as resources --> <EmbeddedResource Remove=\"2sxc\\**\" /> <!-- Exclude miscellaneous files not included elsewhere --> <None Remove=\"2sxc\\**\" /> <!-- Exclude files from the dotnet watch tool --> <Watch Remove=\"2sxc\\**\" /> </ItemGroup> This configuration explicitly tells the build system to ignore all files within the 2sxc directory when compiling, embedding resources, including content files, and monitoring for changes. Save and Rebuild: Save the changes to Oqtane.Server.csproj and rebuild the project by pressing F5 or selecting Build > Rebuild Solution in Visual Studio. Why This Happens Visual Studio automatically includes new files and directories added to the project folder. The 2sxc templates introduce additional files that are necessary for the application to run but are not meant to be part of the compiled code. Including them causes conflicts and compilation errors because the compiler tries to process files that aren't valid C# code or are duplicates. Summary By excluding the 2sxc folder from the build process, you prevent the compiler from processing unnecessary files. This resolves the build errors and allows you to continue developing your Oqtane application with the 2sxc templates installed. Related Problems Installing Apps with Hot Reload Enabled"
"keywords": "Issues Building Oqtane.Server.csproj After Installing 2sxc Templates When developing with Oqtane in developer mode, you typically run Oqtane.Server.csproj by pressing F5 in Visual Studio. This action builds the project and its dependencies before launching it on IIS Express (localhost). However, after installing 2sxc Content and App templates, you might encounter build failures when compiling Oqtane.Server.csproj. Problem Overview After adding 2sxc templates to your Oqtane project, the Visual Studio build process may fail with numerous errors—sometimes over 1,000—rendering Oqtane unusable in the development environment. Affected Folders The problematic folder that cause the build issues is 2sxc. These directory contain assets for the 2sxc apps and templates. Solution: Exclude 2sxc Folder from the Build To resolve the build errors, you need to exclude 2sxc folder from the compilation process. This can be done by modifying the Oqtane.Server.csproj file to tell the compiler to ignore these directory. Steps to Exclude Folders Open Oqtane.Server.csproj: Locate the Oqtane.Server.csproj file in your project directory and open it with a text editor or within Visual Studio. Add Exclusion Rules: Insert the following <ItemGroup> section into the project file: <ItemGroup> <!-- Exclude these directories from compilation --> <Compile Remove=\"2sxc\\**\" /> <!-- Exclude content files from the build output --> <Content Remove=\"2sxc\\**\" /> <!-- Exclude files from being embedded as resources --> <EmbeddedResource Remove=\"2sxc\\**\" /> <!-- Exclude miscellaneous files not included elsewhere --> <None Remove=\"2sxc\\**\" /> <!-- Exclude files from the dotnet watch tool --> <Watch Remove=\"2sxc\\**\" /> </ItemGroup> This configuration explicitly tells the build system to ignore all files within the 2sxc directory when compiling, embedding resources, including content files, and monitoring for changes. Save and Rebuild: Save the changes to Oqtane.Server.csproj and rebuild the project by pressing F5 or selecting Build > Rebuild Solution in Visual Studio. Why This Happens The 2sxc templates introduce additional files that are necessary for the application to run but are not meant to be part of the compiled code. Visual Studio automatically includes new files and directories added to the project folder. Including them causes conflicts and compilation errors because the compiler tries to process files that aren't valid C# code or are duplicates. Summary By excluding the 2sxc folder from the build process, you prevent the compiler from processing unnecessary files. This resolves the build errors and allows you to continue developing your Oqtane application with the 2sxc templates installed. Related Problems Installing Apps with Hot Reload Enabled"
},
"abyss/platforms/oqtane/install-issue-hot-reload.html": {
"href": "abyss/platforms/oqtane/install-issue-hot-reload.html",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5a9e91b

Please sign in to comment.