I installed a VS2017, tried to develop a first app in VS2017.
File > New Project > Visual Basic > Windows Desktop > Windows Forms App (.NET Framework)
simply tried to run an app with only one label on form, but build error comes up, I clicked on "Yes" then dialogue box appears (image).
Error Code- BC37225
Error Message- Failure writing debug information: Unable to load DLL <br>'Microsoft.DiaSymReader.Native.amd64.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Then searched SO, read and tried solutions, but not worked.
What I tried from SO is-
Error while building C# Console Application: Error CS0041 Cannot find a module
(1) installed Microsoft.NETCore.Platforms (nuget package)
(2) installed Microsoft.DiaSymReader.Native.amd64.dll (nuget package)
(3) Unable to load DLL 'Microsoft.DiaSymReader.Native.amd64.dll
in this, solution is available (accepted answer), but I don't know from where to delete these lines of code.
<PropertyGroup>
<Deterministic> true </Deterministic>
</PropertyGroup>
what could be the solution?
When the build errors dialog comes up it asks if you want to run a previous build because the current build will not compile (won't make a new .exe file) Since this is the first run of your program there was no previous build, no .exe. What you need to resolve are the build errors.
I get
'The "TransformWebConfig" task failed unexpectedly. System.Exception: The acceptable value for AspNetCoreModuleHostingModel property is either "InProcess" or "OutOfProcess".'
error while publishing an ASP.NET Core 2.2.0 application (actually it is the included sample application) for win-x64 environment. Both Visual Studio 2017 and 2019 gives the same error. I am working on Windows 10. What should I do to solve this?
Last part of publish Output is:
c:\users\engin\source\repos\NetCoreWebApplication2\NetCoreWebApplication2\obj\Release\netcoreapp2.2\win-x64\PubTmp\Out\
C:\Program Files\dotnet\sdk\2.2.200-preview-009648\Sdks\Microsoft.NET.Sdk.Publish\build\netstandard1.0\TransformTargets\Microsoft.NET.Sdk.Publish.TransformFiles.targets(49,5): Hata MSB4018: "TransformWebConfig" görevi beklenmedik biçimde başarısız oldu.
System.Exception: The acceptable value for AspNetCoreModuleHostingModel
property is either "InProcess" or "OutOfProcess".
konum: Microsoft.NET.Sdk.Publish.Tasks.WebConfigTransform.TransformAspNetCore(XElement aspNetCoreElement, String appName, Boolean configureForAzure, Boolean useAppHost, String extension, String aspNetCoreModuleName, String aspNetCoreHostingModel)
konum: Microsoft.NET.Sdk.Publish.Tasks.WebConfigTransform.Transform(XDocument webConfig, String appName, Boolean configureForAzure, Boolean useAppHost, String extension, String aspNetCoreModuleName, String aspNetCoreHostingModel, String environmentName)
konum: Microsoft.NET.Sdk.Publish.Tasks.TransformWebConfig.Execute()
konum: Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
konum: Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
2 Derleme başarısız oldu. Daha fazla ayrıntı için çıktı penceresini denetleyin.
========== Oluşturma: 1 başarılı, 0 başarısız, 0 güncel, 0 atlandı ==========
========== Yayın: 0 başarılı, 1 başarısız, 0 atlandı ==========
I would suggest disabling web.config transforms altogether. In an ASP.Net Core project you probably do not need to transform web.configs since supplying environment variables is handled by convention with appsettings.[Environment].json files.
From the docs at https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.2:
To prevent the Web SDK from transforming the web.config file, use the <IsTransformWebConfigDisabled> property in the .csproj file:
<PropertyGroup>
<IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>
</PropertyGroup>
I had the same problem and found the solution
In the csproj file, find following line and delete.
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
Had the same issue on .net core 2.2.104. Update the section to this:
<AspNetCoreHostingModelV2>InProcess</AspNetCoreHostingModelV2>
Note the V2 addition.
The answer #Barış Bar provided is working but can cause future errors. There is a bug about UpperCases. Just change InProcess in csproj file with lowercase
<AspNetCoreHostingModel>inprocess</AspNetCoreHostingModel>
It is said that the bug will be corrected in VS 2019.
InProcess or OutOfProcess
Just add this line to your web.config file
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
For me, there was a permission issue which is why, while publishing, a transformation task was running on web.config file. That file did not had access for normal user.
Closing Visual Studio and running it as Administrator then publishing the project worked for me or you can try on setting the correct permissions for the problematic file.
After successfully publishing the project once with administrator privileges, visual studio started working with normal users as well (weird though but good).
UPDATE:
Stumbled into the same problem again, and this time it was not resolved by the above solution, I had to check back the project directory and some of the files were marked Read-Only had to change it to get it working. I suppose this is a problem with the TFS which gets the files and sets them as Read-Only.
My .NET Core 2.2 application build was failing on Jenkins but it was working fine on local machine.
Error: error MSB4018: The "TransformWebConfig" task failed unexpectedly.
Fix: Removed below line from .csproj file
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
I had a project in TFS, due to some issues, the TFS went down and when I made it go online again, it failed to publish the project, while the debugging worked fine. It caused the error (The TransformWebConfig task failed unexpectedly).
After checking the output window, it seemed some files were not accessible to visual studio, or were protected. So, it was because of the TFS, all or most of the files in the project were set as Read-Only which is why Visual Studio couldn't transform those files.
Removing the Read-Only flag from the project fixed the publishing problem.
find the project file (.csproj) and update this code
<AspNetCoreHostingModel>OutProcess</AspNetCoreHostingModel>
to this
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
Adding this to the .csproj file did it for me:
<PropertyGroup>
<IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>
</PropertyGroup>
If you are upgrading your .net core version from 3.1 to higher framework, please check web.config aspNetCore node
The attribute hostingModel should be inprocess (all small case) vs InProcess in .netcore 3.1 framework
This change worked for me and able to publish my project.
I'm using specflow v1.9.0 Baseclass.Contrib.SpecFlow.Selenium.NUnit v1.3.1 and when I try to build the project, I'm seeing the below error
`#error Generation error: Unable to find plugin in the plugin search path: Baseclass.Contrib.SpecFlow.Selenium.NUnit. Please check http://go.specflow.org/doc-plugins for details.`
And in the App.config I got the below code
<specFlow>
<unitTestProvider name="SeleniumNUnit" />
<plugins>
<add name="Baseclass.Contrib.SpecFlow.Selenium.NUnit" path="..\packages\Baseclass.Contrib.SpecFlow.Selenium.NUnit.1.3.1\tools" />
</plugins>
<stepAssemblies>
<stepAssembly assembly="Baseclass.Contrib.SpecFlow.Selenium.NUnit.Bindings" />
</stepAssemblies>
</specFlow>
I encountered a similar error but with a different plugin and the steps outlined in Unable to find plugin in the plugin search path: SpecRun when saving / generating feature files resolved it for me:
1. Make sure the NuGet folders are properly restored.
2. Close Visual Studio.
3. Delete the bin\Debug folder from your project(s).
4. Reopen your solution in Visual Studio.
Make sure that in the given path the file "Baseclass.Contrib.SpecFlow.Selenium.NUnit.SpecFlowPlugin.dll" exists.
When are your *.feature.cs files generated? When you save the file or at build?
If it is at saving, regenerate the code behind file.
The solution above didnt work for me. The issue was only resolved when I've tried the following:
Go to VS->Tools->Options
Go to SpecFlow
Go to Test Execution
Change Test Runner Tool to something else than SpecRun and Auto (NUnit, MS...)
Build the project. This time it should work.
Change the Test Runner Tool back to SpecRun
Enjoy :)
Test Runner Tool option in Tools->Options
Still if you are facing same issue uninstall the plugin Baseclass.Contrib.SpecFlow.Selenium.NUnit and install it again
I try to build Windows Store app using MSBuild.
C:\Windows\Microsoft.NET\Framework\v4.0.30319>MSBuild.exe /t:build /p:Configurat
ion=Release;Platform=x86 E:\MyApp.W8.csproj /logger:FileLogger,Microsoft.Build.Engine;logfile=E:/log/test.txt /p:OutputPath=E:/result
And I got this error:
"E:\MyApp.W8.csproj
" (build target) (1) ->
(CopyGeneratedXaml target) ->
C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v12.0\8.1\Microsoft.Wind
ows.UI.Xaml.Common.targets(476,9): error MSB3021: Unable to copy file "obj\x86\
Release\E:\MyApp.Shared\App.xbf" to "E:\result\E:\MyApp.Shared\App.xbf". The given path's format is not
supported. [E:\MyApp.W8.csproj]
I don`t know why MSBuild tries to use
obj\x86\Release\E:\MyApp.Shared\App.xbf
instead obj\x86\Release\App.xbf
or absolute path to App.xbf.
According to this post, inside your .projitems file you'll find the following code:
<ApplicationDefinition Include="$(MSBuildThisFileDirectory)App.xaml">
<SubType>Designer</SubType>
</ApplicationDefinition>
Replace this with:
<ApplicationDefinition Include="$(MSBuildThisFileDirectory)App.xaml">
<SubType>Designer</SubType>
<Link>App.xaml</Link>
</ApplicationDefinition>
I am creating a DNN module, and have a working module based on this: http://www.subodh.com/Projects/DNN-Module.
When I install it on a DNN 5.6.2 installation, everything works fine, except the .ascx files do not copy over. If I copy the .ascx files manually, the module works fine.
My .dnn file looks like this:
...
<moduleDefinitions>
<moduleDefinition>
<friendlyName>SignUp.Control1</friendlyName>
<defaultCacheTime>0</defaultCacheTime>
<moduleControls>
<moduleControl>
<controlKey />
<controlSrc>Control1.ascx/Control1.ascx</controlSrc>
<supportsPartialRendering>True</supportsPartialRendering>
<controlTitle>Control1</controlTitle>
<controlType>View</controlType>
<iconFile />
<helpUrl />
<viewOrder>0</viewOrder>
</moduleControl>
...
</moduleControls>
</moduleDefinition>
</moduleDefinitions>
...
Specifically, Control1.ascx does not get copied to the DesktopModules/SignUp directory.
I do not get an error. Here is the relevant section of what DNN says when installing the module. I get no errors on install.
...
Info Component installed successfully - Script
Info Starting Installation - Module
Info Module registered successfully - SignUp
Info Component installed successfully - Module
Info Starting Installation - Assembly
...
Can anyone tell me why the controls are not copying over to the appropriate directory?
Thanks.
It seems you have a mistake in <controlSrc> tag, maybe you mean: <controlSrc>DesktopModules/SignUp.Control1/Control1.ascx</controlSrc>
Also you need to mention this file in <component type="File">:
<component type="File">
<files>
<file>
<path>Your Desire Path</path>
<name>Control1.ascx</name>
</file>
</files>
</component>
In addition to Ehsan's answer you can use MSBuild and Chris Hammonds template (http://christoctemplate.codeplex.com) which will create a resources zip and you have a single resources node rather than individual nodes for each file