azure developement fabric dll hell - asp.net-mvc

Hello I am trying to package and start up azure developement fabric on a windows 2008 server, I am so close yet still far. The steps I take are
1) run cspack.exe command /copyOnly to generate the .csx folder
2) run csrun.exe commmand /LaunchBrowser to start up the developement fabric and startup the browser
the error is as follows
System.BadImageFormatException: Could
not load file or assembly
'Interop.SSCE' or one of its
dependencies. An attempt was made to
load a program with an incorrect
format.
== Pre-bind state information === LOG: User = IP-0AE2B2DF\Administrator LOG:
DisplayName = Interop.SSCE (Partial)
LOG: Appbase =
file:///C:/Users/Administrator/Documents/Visual
Studio
2010/Projects/MyAzureProject/src/AzureCloudService/ServiceDefinition.csx/roles/MyAzureProject.Web/approot/
LOG: Initial PrivatePath =
C:\Users\Administrator\Documents\Visual
Studio
2010\Projects\MyAzureProject\src\AzureCloudService\ServiceDefinition.csx\roles\MyAzureProject.Web\approot\bin
Calling assembly : (Unknown).
=== LOG: This bind starts in default load context. LOG: Using application
configuration file:
C:\Users\Administrator\Documents\Visual
Studio
2010\Projects\MyAzureProject\src\AzureCloudService\ServiceDefinition.csx\roles\MyAzureProject.Web\approot\web.config
LOG: Using host configuration file:
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file
from
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Policy not being applied to
reference at this time (private,
custom, partial, or location-based
assembly bind). LOG: Attempting
download of new URL
file:///C:/Users/Administrator/AppData/Local/dftmp/s0/deployment(98)/res/deployment(98).AzureCloudService.MyAzureProject.Web.0/aspNetTemp/aspNetTemp/root/dfbc079a/82bed8d5/Interop.SSCE.DLL.
LOG: Attempting download of new URL
file:///C:/Users/Administrator/AppData/Local/dftmp/s0/deployment(98)/res/deployment(98).AzureCloudService.MyAzureProject.Web.0/aspNetTemp/aspNetTemp/root/dfbc079a/82bed8d5/Interop.SSCE/Interop.SSCE.DLL.
LOG: Attempting download of new URL
file:///C:/Users/Administrator/Documents/Visual
Studio
2010/Projects/MyAzureProject/src/AzureCloudService/ServiceDefinition.csx/roles/MyAzureProject.Web/approot/bin/Interop.SSCE.DLL.
ERR: Failed to complete setup of
assembly (hr = 0x8007000b). Probing
terminated.
this error happens with 2 dlls Interop.SSCE.DLL and SqlLite.dll Ive replaced all references to SqLite dll with a 64bit version and I dont have any references anymore to Interop.SSCE.DLL since I am not using it. Manually deleting these assemblies from the location
"C:\Users\Administrator\Documents\Visual Studio
2010\Projects\MyAzureProject\src\AzureCloudService\ServiceDefinition.csx\roles\MyAzureProject.Web\approot\bin"
solves the issue, but I dont obviously want to manually delete these everytime as I trying to automate a build process. My question is then how is the .csx folder actually generated and will this give me clues as to where these dll's are bring copied from? This is really frustrating as with the exception of those dll errors, I =m able to package the solution and startup the developement fabric with no other problems. Please Help!!

I realize this is old, but I just ran across it while trying to solve the same problem. In my case, the issue was that some of my projects were set to build x86 assemblies, instead of Any CPU. The solution was:
Go to Build -> Configuration Manager
Make sure "Active solution platform" is set to "Any CPU"
Make sure each of the projects also has the "Platform" set to "Any CPU"
Rebuild

Go to:
Tools > Options > Projects and Solutions > Web Projects
Check the Use the 64 bit version of IIS Express for web sites and projects.
This will ensure that your web project runs in x64 mode and will thus be able to use Service Fabric files.
Hope it helps...

Related

VS 2019 Publish issue - Unable to load the service index for source https://api.nuget.org/v3/index.json

I am having an issue when I try to publish a specific solution.
Related into:
I have been able to publish/deploy about 6 solutions with no issues.
The solution that is giving me issues when I try to Publish runs 100% on my local VS 2019, the issue is publishing
This is my first solution I created from new on VS 2019. All others were created on VS 2017
I can run in browser - https://api.nuget.org/v3/index.json
I did try to Run a NuGet package restore
I did try to implement different solutions I found while researching
If you google search for the error of “The request was aborted: Could not create SSL/TLS secure channel” you will see a lot of articles. I tried the solutions detailed with obviously no luck.
...
1>------ Publish started: Project: HFSPackagesApi, Configuration: Release Any CPU ------
Connecting to C:\deployments\HFSPackagesApi...
Determining projects to restore...
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets(128,5): Error : Unable to load the service index for source https://api.nuget.org/v3/index.json.
An error occurred while sending the request.
The request was aborted: Could not create SSL/TLS secure channel.
C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): Error NETSDK1004: Assets file 'F:\source\BitBucket\gmborl\LiveBackup\ReleaseInsightApp\HFSPackagesApi\HFSPackagesApi\obj\publish\win-x64\project.assets.json' not found. Run a NuGet package restore to generate this file.
1>Build failed. Check the Output window for more details.
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
...
Fixed it in Windows 7 by doing these steps, outlined in Support Article:
Step 1
Add a DWORD registry entry called DefaultSecureProtocols with a value of 0x00000a00 to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp
Note: Second one (in Wow6432Node) is needed only on 64-bit Windows.
Step 2
Created sub keys:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client
In each of them add a DWORD entry called DisabledByDefault with a value of 0.
Note: You may need to create the TLS 1.x key and also the Client key.
After getting my Window 10 laptop operational with VS 2019 I am able to publish my solution.
This is no longer an issue.
I had the same problem. The OS is windows 7 profession service pack 1. When I published the ASP NET CORE project on IIS, the problem happened.
I solved it with the following steps.
First, I searched the https://api.nuget.org/v3/index.json on browser, it worked.
Second, I followed the solution from user11693, and I solved it.

Publish Failed to sign msix

Using Visual Studio 2019 to publish an update to an existing windows store application. This worked a week ago.
Our solution builds without error. When I go to create the setup package I get an error "Failed to sign 'D:\dev\MeyerMusic\MeyerTablet\TabletDistribution\bin\AnyCPU\Release\MeyerMusicTabletSetup_2.6.6.0_AnyCPU.msix'."
We are distributing the application as a Microsoft Store app under the existing app name.
Last week on this same development computer I built version 2.6.5 as well as many packages before that.
The error number is blank or missing. I do not have a reason for the failure. I only see one fact in the error message and that points to line 4574 in the file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppXPackage.Targets
That line is this:
<SignAppxPackage Condition="'$(AppxPackageSigningEnabled)' == 'true'"
AppxPackageToSign="$(AppxMainPackageOutput)"
CertificateThumbprint="$(PackageCertificateThumbprint)"
CertificateFile="$(PackageCertificateKeyFile)"
CertificatePassword="$(PackageCertificatePassword)"
HashAlgorithmId="$(AppxHashAlgorithmId)"
EnableSigningChecks="$(EnableSigningChecks)"
SignAppxPackageExeFullPath="$(SignAppxPackageExeFullPath)"
TempCertificateFilePath="$(TempCertificateFilePath)"
VsTelemetrySession="$(VsTelemetrySession)"
SigningTimestampServerUrl="$(AppxPackageSigningTimestampServerUrl)"
SigningTimestampDigestAlgorithm="$(AppxPackageSigningTimestampDigestAlgorithm)"
/>
Troubleshooting steps:
Attempted to build a side load package. Results in same error
Successfully built a side load package that was not signed
I have restarted Visual Studio
I have rebooted the machine
I have deleted OBJ, BIN for the entire solution
I have looked for errors in the event log but none have been found so far.
After uninstalling KB4535996 the problem was resolved.
I found this via a tip from the following post: https://developercommunity.visualstudio.com/content/problem/934967/uwp-error-failed-to-sign.html

sqlpackage.exe - how do I exclude synonyms>

I'm running sqlpackage.exe as park of an automated deployment script creation process, however we have synonyms in the database, which are different depending on the environment (Dev/Test/Live). The problem is that the database project has the synonyms as they are in the Dev environment, but when I run sqlpackage to compare against Test or Live, the synonyms are different and so they get scripted to be dropped and re-added to point to Dev.
I've seen on http://blogs.msdn.com/b/ssdt/archive/2015/02/23/new-advanced-publish-options-to-specify-object-types-to-exclude-or-not-drop.aspx that apparently there's a new parameter "ExcludeObjectType", but when I try running it using that parameter it gives me an error 'ExcludeObjectType' is not a valid argument for the 'Script' action (and I have the latest version of sqlpackage.exe).
Any ideas on what I can do here?
After downloading the latest SSDT for Visual Studio I still had the same issue. Next I downloaded Data-Tier Application Framework (May 2015) and used the new SqlPackage installed at C:\Program Files\Microsoft SQL Server\120\DAC\bin\sqlpackage.exe and the error went away and worked as expected.
Thank you sir! When I created the deployment script in VS, no change detected but when I tried to deploy using sqlpackage I got the error:
* The object [x] already exists in database with a different definition and will not be altered.
After adding the ExcludeObjectTypes switch I got the following error:
* 'ExcludeObjectTypes' is not a valid argument for the 'Publish' action.
But after downloading and installing latest Data-Tier App framework all works as expected with no errors.

How can I let Visual Studio 2012 detect if virtual directories need to be remapped?

My situation:
I am working on an ASP.NET MVC project and debug in IIS-Express. Sometimes when we create a temporary branch, this branch will use the same port for debugging. This means the virtual directory in IIS is the same and I can't run them both at the same time.
How it used to work in vs2010:
This is not really a problem because I don't want to run them at the same time. However, in VS2010, I would get a warning when opening the branch for the first time. It asked me if I wanted to remap the URL. When I later returned to open the trunk, I would get the same warning (See https://stackoverflow.com/a/3093534/210336).
How it doesn't work in vs2012:
Now in VS2012, I don't get the warning anymore. If I forget to manually go to the settings and press "Create Virtual Directory" (This has happend a few times), then when I click run in the branch, it will actually run the trunk. This can be extremely confusing. Especially if I try to debug or the system breaks on an exception. A source file from the trunk will be opened in the branch solution. I then think I'm editting the branch, but I am in fact editting the trunk...
Is there anyway to let VS2012 perform the same check as VS2010?
Or am I doing/understanding something else completely wrong?
VS actually edits the IIS Express configuration file found in one of these paths
%userprofile%\documents\iisexpress\config\applicationhost.config
%userprofile%\my documents\iisexpress\config\applicationhost.config
When leaving it up to VS, I tend to see duplicated and conflicting configurations.
For local development, I prefer to start IIS Express from cmd or powershell script as it does not require attaching (but can be attached) and gives me control over the configuration. I make a copy of the iis config and specify the config file in the iis express command. I have a powershell script that sets the path based on the executing directory so no matter which branch, it is always set to the one I'm working in.
Here is some information about running iis express from the command line:
http://www.iis.net/learn/extensions/using-iis-express/running-iis-express-from-the-command-line
And here is a good resource for running iis express from powershell:
https://blog.differentpla.net/post/UaYcAPDfiVJBAAAC/running-iis-express

Msbuild error: failed to start monitoring file changes

when i run Msbuild web.csproj i get the following error:
AfterBuild target> -> C:..\web\obj\debug\csautoparameterize\original\web.config
: error ASPconfig: an error occurred
loading a configuration file:
Directory C:..\web\obj\debug\csautoparameterize\original\Configs'
does not exist. Fail to start
monitoring file changes.
if i open visual studio (2010)..clean solution and rebuild, its fine. if i try to do publish via visual studio, this error returns and i cant build again (until i clean solution).
any ideas?
thanks
Is that a network drive? I was getting a similar error when I had my SVN working copy on a network drive, apparently the folder monitoring service for the test server completely freaks out when it's not a physical drive.

Resources