HelloWorld console application fails to publish with ClickOnce - visual-studio

thanks in advance. Publishing with my VisualStudio/ClickOnce I get always the following error.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users\carlos\Documents\visual studio 2012\Projects\ConsoleApplication1\ConsoleApplication1\publish\ConsoleApplication1.application resulted in exception. Following failure messages were detected:
+ Configuration system failed to initialize
+ Unrecognized configuration section startup. (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\dfsvc.exe.Config line 2)
The dfsvc.exe.Config is:
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="false">
<supportedRuntime version="v4.0" sku="client" />
</startup>
</configuration>
Is something that I should install on my PC? Thanks again.

I found a solution,
I don't know exactly which was the fix, I did three steps:
1 - I repaired .net fx intallation
2 - Ran mage -cc to clear clickonce store
3 - Rebooted
thanks

Related

Application could not be uploaded on device

I have a crossplatform solution for an application. I have recently tried to add push notifications functionality for my IOS project.
But when i try to install my project on my ios i get this error.
Package Inspection Failed Error (error: 0xe8000051).
I have tried:
- Cleaning solution
- rebuild
- checking build action for my info.plist
- removing bin folder
the full trace of the install looks like this:
PreflightingApplication - PercentComplete: 30%
PackageInspectionFailed: Failed to load Info.plist from bundle at path /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.xhvJhV/extracted/ODEON.iOS.app/Frameworks/PersonalizedAdConsent.framework
error MT1006: Could not install the application '/Users/anderslarsen/Documents/Projects/ODEON/ODEON/ODEON.iOS/bin/iPhone/Release/ODEON.iOS.app' on the device 'Anders - iPhone': Package Inspection Failed Error (error: 0xe8000051).
Can anyone help me with this error?
Thanks in advance!
I could not find the reason this happens and I researched a lot, 2 years after this question was done I'm still getting this error. From my personal experience, manually deleting "bin" and "obj" and then building the iOS project again would solve the issue.

Could not load file or assembly in VS2017 with IIS express

We have a ASP.NET project in the company that runs for 5/6 developers. All Visual Studio 2017 and debug on IIS Express, no crazy setting or anything to make it run.
1 colleague cannot get it to work, he always gets the following exception:
We had this problem a few months back, then out of frustration the PC was re-installed and the problem was gone. He didn't develop for a few weeks and today the problem appeared again.
I searched long and far but it's such a generic error I can't really figure this one out.
When I run the fusion log viewer I see the following result:
https://pastebin.com/aCVZn3EB
The operation failed.
Bind result: hr = 0x80131018. No description available.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Program Files\IIS Express\iisexpress.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = System.ServiceModel.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Users/User/Projects/project/project.UserSite/
LOG: Initial PrivatePath = C:\Users\User\Projects\project\project.UserSite\bin
LOG: Dynamic Base = C:\Users\User\AppData\Local\Temp\Temporary ASP.NET Files\vs\e0254dae
LOG: Cache Base = C:\Users\User\AppData\Local\Temp\Temporary ASP.NET Files\vs\e0254dae
LOG: AppName = 38c6ff11
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\User\Projects\project\project.UserSite\web.config
LOG: Using host configuration file: C:\Users\User\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Binding succeeds. Returns assembly from C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll.
LOG: Assembly is loaded in default load context.
ERR: Unrecoverable error occurred during pre-download check (hr = 0x80131018).
*** Assembly Binder Log Entry (7/18/2017 # 8:55:15 AM) ***
Are you trying to load a .NET 4 assembly with an EXE that asked for a diferrent CLR version? That requires an app.exe.config file that forces CLR 4 to be used.
Also please check the he has the same version of .NET installed.
1- Close Visual Studio
2- Delete all files from "C:\WINDOWS\Microsoft.NET\Framework......\Temporary ASP.NET"
3- Open VS
4- Rebuild then run
I have the same issue, its random. Just install missing package via Nuget for that project. Open Package Manager Console and type:
PM> Install-Package System.ServiceModel.Activities
and go on installing packages till there is no more error: then stop.
Turns out with the help of Fusion Log I found 1 file that was 0kb in size: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll
I restored the file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.ServiceModel.Activities.dll and it worked again!

xcodebuild (XCode 7.1) - unexpected successful exit code from cancelled command

I'm getting the following during the bundle resources copying phase in xcodebuild (XCode 7.1):
2015-11-03 22:16:28.218 xcodebuild[28202:300463] DVTAssertions:
Warning in
/Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-9061/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/BuildSystem/Runtime/PBXTargetBuildContext.mm:739
Details: unexpected successful exit code from cancelled command
<C0505:'CpResource Foo.json':P10> Object: <PBXTargetBuildContext:
0x7faec015a440> Method:
-createCommandInvocationRecordFromInvocation: Thread: <NSThread: 0x7faebc8cc070>{number = 10, name = (null)} Please file a bug at
http://bugreport.apple.com with this warning message and any useful
information you can provide.
I have ~170 items I'm copying, but for some reason a few of them give me this error.
EDIT - I just ran the command again and now it works, so it doesn't seem deterministic.
The issue was a duplicate folder in the Copy Bundle Resources section. It used to be two different files, but they were moved so XCode decided to change them both to the folder they got moved into. Go figure.
Had this issue a couple of months ago. Today that error made it's comback.
I have it only if I try to emulate from ionic (--livereload) on a iOS-Device. Seem like if you have Xcode running it occurs. Close Xcode. That fixes it.

Error 1 Unable to copy file "obj\Debug\SourceProject.exe" to "bin\Debug

This is a super weird question for Visual Studio 2013: Windows Forms Application 3.5!
I designed and made the program, then I ran the program for the first time and an error pops up.
And then I click cancel, retry and this time I click yes and this pops up:
Error while trying to run project: Could not load file or assembly
'SourceProject' or one of its dependencies. The located assembly's
manifest definition does not match the assembly reference.(Exception
from HRESULT: 0x80131040)
Any ideas on fixing it?
FULL ERROR LOG
Error 1 Unable to copy file "obj\Debug\SOURCEPROJECT.exe" to
"bin\Debug\SOURCEPROJECT.exe". Access to the path
'obj\Debug\SOURCEPROJECT.exe' is denied. SOURCEPROJECT
Just open your Debug Configuration near by Application Run Button in VS. Then , Choose debug with Any CPU to x64 or x86 .. May be it will help someone.
Thanks,

How to integrate NCover and MSTest 10.0?

Using NCover Community edition, I tried:
set ncover="C:\Program Files (x86)\NCover\NCover.Console.exe"
set mstest="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe"
set testdllfolder="C:\.hudson\jobs\Project\workspace\src\TestProject\bin\Debug"
%ncover% //x coverage.xml //w %testdllfolder% %mstest% /noisolation /testcontainer:TestProject.dll
The output begins like this
Working Directory:
Assemblies:
Coverage Xml: C:.hudson\jobs\Project\workspace\src\coverage.xml
Coverage Log: Coverage.Log
Waiting for profiled application to connect...Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1
and after the MSTest output
Test Run Failed.
Passed 8
Failed 2
Inconclusive 2
Total 103
Results file: C:.hudson\jobs\Project\workspace\src\debug.trx
Test Settings: Local
Connected
Profiled process terminated. Profiler connection not established.
How to fix that?
Can you post the console output to your message? That'd tell if the session completed successfully. It could be that the coverage xml isn't showing because it's going to a directory other than the one you think it should. It's default is the current command prompt directory.
Also, you may want to try using the latest edition of NCover, v.3.4.16. You can get a 21-day trial for free at www.ncover.com/download.

Resources