Nuget error after adding AzureCloudServce to existing MVC4 app - azure

I have an MVC 4 application that I want to convert to an Azure Cloud Service. These are the steps I took:
Update-Package to get everything on the latest
I followed the steps at this blog
Build Solution (succeeds)
F5 -> Get error that VS2012 needs to run elevated
Restart VS2012 elevated -> get this error in Package Manager Console:
At C:\Users\jlearmouth\Documents\Visual Studio 2012\Projects\MeetingMinutes\packages\MvcScaffolding.1.
0.9\tools\init.ps1:35 char:45
| %{ [System.IO.Directory]::EnumerateFiles <<<< ($_, "*." + $extension, [System.IO.SearchOpt
ion]::AllDirectories) }
CategoryInfo : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : DotNetMethodException
The solution seems to run, but I don't like this error. I don't know what it means and I don't know what to do about it. Google has similar things but not the same MethodInvocationException... tried their solutions - nothing (mostly uninstall/reinstall MvcScaffolding)
What is this error and how do I fix it?

This looks like an error coming from the MvcScaffolding package. Have you tried contacting the author of this package? Go to this page and click the Contact Owners link on the left bar https://nuget.org/packages/MvcScaffolding/

Related

I cant find the folder I created through create react app for creating a staking dApp

I am taking a course on Blockchain Development through Blockchain Council and I am working on a project called "Developing Advanced Smart Contract using Solidity." I have to set up the project by using the 'create-react-app' function and name the folder 'staking_dapp_.' Well I did that and it seems to work but when I try to do 'cd staking_dapp_' to bring up the folder I get this message:
cd : Cannot find path 'C:\WINDOWS\system32\staking_dapp_' because it does not exist.
At line:1 char:1
cd my-app
+ CategoryInfo : ObjectNotFound: (C:\WINDOWS\system32\my-app:String) [Set-Location], ItemNotFoundExceptio
n
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
Well what I tried to do was to at least locate the file manually and I found it in my 'sysWOW64' directory. I tried moving it to 'my system32' and it did move the files over but when I try to execute a 'truffle compile' command it comes up with an error: 'everything is up to date, there is nothing to compile' and not only that but it won't create the 'truffle config.js file' that I need. I went ahead and uninstalled the create react app, node.js, truffle and deleted all the files for the 'staking dapp' folder and still does the same thing. Please help.

mutipass:launch failed: Failed to resize instance image - error executing powershell command

I always have the following error when I install a virtual machine
launch failed: Failed to resize instance image - error executing powershell command. Detail: Resize-VHD : �޷������������̵Ĵ�С��
ϵͳ�޷�������C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\multipassd\vault\instances\krun\ubuntu-20.04-serv
er-cloudimg-amd64.vhdx���Ĵ�С��
�޷������������̵Ĵ�С��
ϵͳ�޷�������C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\multipassd\vault\instances\krun\ubuntu-20.04-serv
er-cloudimg-amd64.vhdx���Ĵ�С: ��һ����������ʹ�ô��ļ��������޷����ʡ� (0x80070020)��
����λ�� ��:1 �ַ�: 1
Resize-VHD -Path C:/WINDOWS/system32/config/systemprofile/AppData/Roa ...
+ CategoryInfo : ResourceBusy: (:) [Resize-VHD], VirtualizationException
+ FullyQualifiedErrorId : ObjectInUse,Microsoft.Vhd.PowerShell.Cmdlets.ResizeVhd
Background
In my case, I changed the location of my multipass instance locations by following this post here. I then created a folder on my drive where I wanted the instances to be stored.
After doing so, multipass launch failed with your exact same error. After trying reboots, uninstall/reinstall multipass, etc. - I finally tried renaming the folder where I wanted to store my multipass instances, and this worked.
Apparently, if your destination multipass folder includes a space, some part of the script fails.
Workaround / Fix
When specifying a multipass instance destination:
MULTIPASS_STORAGE -Value "<path>"
Make sure there are NO SPACES in the "<path>" you have provided.
Hope this helps.
You have to add the HyperV module to powershell in "Turn Windows features on or off", if you don't check this the checkbox, "Resize-VHD" won't work and will fail the multipass launch.
The direct command is:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-PowerShell

"An error occurred while creating the pipeline." when running powershell script in Azure pipeline self-hosted agent

When I run simple powershell with only ls command in it through Azure pipeline self-hosted agent I see error:
An error occurred while creating the pipeline.
+ CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : RuntimeException
The same script runs fine locally in the same folder on the same machine (when no Azure agent is involved). The pipeline has not been changed in months.
The execution policy is set to "Unrestricted".
There is no difference whether the agent is run with admin permissions.
I checked and the files in the folders of the agent do not look blocked or read-only.
We run tests through powershell scripts and they started to fail last week, without any obvious reason. The only thing that I have installed on the same machine, is Visual Studio 2022 Preview 5, but I have restarted the machine immediately after the installation has passed successfully and the next day the tests have passed.
I had a look through similar errors here, in stackoverflow, but they were not useful, including this one PowerShell "an error occurred while creating the pipeline" #Requires -Version 3.0
Do you have an idea what can cause this?
The PowerShell scripts started passing when I changed the Azure Powershell pipeline task version from 1* to 2* (the latest available for our pipelines).
I do not know why this fixed the issue, as I think the difference between these 2 version is that version 2* can be executed on agents that have operating system that is not Windows.

Operation timed out publishing Service Fabric application to Azure

When I try to publish my Service Fabric application to a Azure cluster I get the following error message:
3>Copy-ServiceFabricApplicationPackage : Operation timed out.
3>At C:\Program Files\Microsoft SDKs\Service
3>Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1:230 char:9
3>+ Copy-ServiceFabricApplicationPackage -ApplicationPackagePath ...
3>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3> + CategoryInfo : OperationTimeout: (:) [Copy-ServiceFabricApplicationPackage], TimeoutException
3> + FullyQualifiedErrorId : CopyApplicationPackageErrorId,Microsoft.ServiceFabric.Powershell.CopyApplicationPackage
3>
3>Finished executing script 'Deploy-FabricApplication.ps1'.
3>Time elapsed: 00:12:45.2589165
Apperently there is a hard-coded 10 minute timeout in the publish script as you can read here: https://github.com/Azure/service-fabric-issues/issues/10
This timeout will be removed in an upcomming release, but in the mean time what are my options? Is there a way I can publish my application service by service?
Any suggestion is welcome!
I've solved this by having a virtual machine running in azure. I've installed Visual Studio 2015 community and the service fabric SDK.
I then use Visual Studio Online to host my code. I build and test locally, and when I'm happy, commit to visual studio online, then RDP onto my build machine and then pull, build and deploy from there.
I've actually gone one step further by creating build and deploy powershell scripts so I don't need to run visual studio.
This problem has been addressed in version 2.5.216 of the Service Fabric SDK.
In the publish profile schema, you can now:
Compress the package to speed up transfer
Set the timeout duration to a value greater than 10 minutes
Add the following line to the PublishProfiles\Cloud.xml file to enable compression and change the timeout from 10 minutes to 60 minutes:
<CopyPackageParameters CopyPackageTimeoutSec="3600" CompressPackage="true" />
I followed a similar approach to Andrew Shepherd suggestion. Edited the powershell deployment file located in <MyServiceFabricApp>\Scripts\Deploy-FabricApplication.ps1 and changed the $CopyPackageTimeoutSec variable to 3600. A code snippet is shown below :
Param
(
....
[int]
$CopyPackageTimeoutSec = 3600
)
...

Desktop App Converter "Fatal Error 1000"

I receive the following error when attempting to run the Desktop App Converter (Project Centennial):
Assert-RequiredFeatureEnabled: fatal error 1000: required feature is not installed or enabled. Please refer to machine setup instructions.
At C:\Users\%%%\Documents\DesktopAppConverter\converter_util\EnvironmentAssertions.ps1:40 char:9
+ throw "Assert-RequiredFeatureEnabled: fatal error 1000: requi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Assert-Required...p instructions.:String) [], RuntimeException
+ FullyQualifiedErrorId : Assert-RequiredFeatureEnabled: fatal error 1000: required feature is not installed or enabled. Please refer to
machine setup instructions.
The relevant script is in EnvironmentAssertions.ps1:
$feature = Get-WindowsOptionalFeature -Online -FeatureName "Containers"
if (!$feature) {
throw "Assert-RequiredFeatureEnabled: fatal error 1000: required feature is not installed or enabled. Please refer to machine setup instructions."
}
I found no items in Windows Features that appear related to containers.
How can this error be resolved?
Windows 10 Pro insider preview (build 14316) and Desktop App Converter preview (0.1.8.release_2016-04-05_17-47_5aa8cc)
After looking around, it appears that the "Containers" feature is only on Enterprise versions of Windows 10 at the moment - perhaps they will extend this to Pro eventually, but I think that's why we can't get it working.

Resources