dnu restore error (Could not find part of a path..) - asp.net-core

Anyone attempt using entity framework-beta8 migrations? Everytime I run the dnx ef command I get the following
"Error: . Please run dnu restore to generate a new lock file"
running dnu restore then gives the error
Could not find a part of the path "c:\users\Username\ .dnx\packages\Owin\1.0.0\Owin.1.0.0.nupkg.sha512
Any idea what's going wrong?
EDIT
Checking it now and the path on the C drive is 1.0 not 1.0.0..that seems to be part of the issue here. Not sure if it was the right thing to do but renaming the folders worked in the end

I tried #Lutando's suggestion but got a command prompt error
'dnx' is not recognized as an internal or external command, operable program or batch file.
If you get this, do the following:
dnvm upgrade
dnu restore
Then you should be back in business

Related

IntelliJ throws "init terminating in do_boot", but same erl command works in Windows command line

Setup: IntelliJ IDEA 2022.2.2, Erlang 25.0
I am trying to run the Erlang code available at https://erlangbyexample.org/send-receive. I am able to run in werl and Windows command line. But I am getting the error "init terminating in do_boot" when I run in IntelliJ.
I checked a similar issue reported in this question , wherein the solution was to convert list input to integer/s. However, my Erlang code does not expect any input, it just expects the function name.
Please provide a pointer to resolve the issue.
"C:\Program Files\Erlang OTP\bin\erl.exe" -pa F:/1TB/P/workspace-IntelliJ-Erlang1/out/production/workspace-IntelliJ-Erlang1 -pa F:/1TB/P/workspace-IntelliJ-Erlang1 -eval send_recv:run(). -s init stop -noshell
{"init terminating in do_boot",{undef,[{send_recv,run,[],[]},{erl_eval,do_apply,7,[{file,"erl_eval.erl"},{line,744}]},{init,start_it,1,[{file,"init.erl"},{line,1234}]},{init,start_em,1,[{file,"init.erl"},{line,1220}]},{init,do_boot,3,[{file,"init.erl"},{line,910}]}]}}
init terminating in do_boot ({undef,[{send_recv,run,[],[]},{erl_eval,do_apply,7,[{_},{_}]},{init,start_it,1,[{_},{_}]},{init,start_em,1,[{_},{_}]},{init,do_boot,3,[{_},{_}]}]})
Crash dump is being written to: erl_crash.dump...done
I configured RunConfiguration to BUILD before RUNNING ("Before launch" section). As result, RunConfiguration was creating an empty folder "../out/production/workspace-IntelliJ-Erlang1" without .beam files, if the folder does not exist. It would delete any existing .beam files if the folder exists. Hence, the RUN was failing eventually.
As a workaround, I removed the BUILD before RUNNING option from RunConfiguration. And, I manually built using BuildProject before RunConfiguration.
TODO: I will check why was not RunConfiguration able to generate the .beam file.
Check if there is a file called send_recv.beam in either of the directories specified as code path in the -pa arguments. (The undef error means that it can't find the function send_recv:run/0, more often than not because it can't find the compiled module.)
My guess is that this file is actually in the directory where you ran Erlang from the command prompt, but IntelliJ runs Erlang using another working directory. The current working directory is part of the code path by default, which would be why this works from the command prompt but not within IntelliJ.

DNU Restore results in multiple "The file exists" warning and errors and eventually dies

I recently updated my VS 2015 to Update 2 and also did a dnvm update-self. After taking these actions I'm now unable to perform dnu restores. I see the following error for almost every package from both myget and nuget
GET https://www.nuget.org/api/v2/FindPackagesById()?id='xunit.runner.dnx'
Warning: FindPackagesById: xunit.runner.dnx
The file exists.
GET https://www.nuget.org/api/v2/FindPackagesById()?id='xunit.runner.dnx'
Error: FindPackagesById: xunit.runner.dnx
The file exists.
Eventually the entire operation bombs out. I've tried reinstalling my DNX's (currently using RC1-Update1), deleting all packages etc... to no avail. Any ideas are appreciated.
I found what resolved my issue here:
https://github.com/aspnet/dnx/issues/2505
Looks like my %userprofile%/AppData/Local/Temp folder got some possibly corrupted data in it that was confusing dnu restore. DNU restore caches packages here during processing. I purged the directory and DNU restore appears to be working well again.

dnu restore fails on mac

I download visual studio code for mac today. I tried to create a simple asp.net 5 web application following these instructions https://code.visualstudio.com/Docs/ASPnet5
When I open my web application folder in visual studio, it says I need to run a restore command.
I ran the dnu restore command just like the instructions tell me but it seems to always fail.
I receive different errors every time I run it. But most of them are like this one:
CACHE https://www.nuget.org/api/v2/package/System.Threading/4.0.10-beta-22816
SharpCompress.Common.ArchiveException: Could not find Zip file Directory at the end of the file. File may be corrupted.
Restore failed
There is a stack trace as well, but for brevity sake I'll omit it for now
Has anyone experienced this?
Try dnu restore --no-cache.
You may also need to remove previously downloaded files - check ~/.dnx/packages. I removed all files from that folder some time before trying the above. Also, see the comments below, if ~/.dnx/runtimes contains unexpected versions removing them may also work. Note that the current runtime version can be controlled using dnvm.
I never saw the NullReference exception, but I was getting the SharpCompress.Common.ArchiveException. I suspect there was a mismatch from what dnu thought was the cache state with the actual cache state (maybe something timed out the first time or something).

invoke-sqlcmd failing after Automated SQL install with powershell

I'm using Powershell 4 to install SQL 2014. everything goes ok except at the very end where I have a function that will run a script from a .sql file using invoke-sqlcmd. I get the following error:
"The term 'invoke-sqlcmd' is not recognized as the name of a cmdlet, function, script file..."
If I try and import the sqlps module I get:
The specified module 'sqlps' was not loaded because no valid module file was found in any module directory.
But here's the kicker. If I open a separate PowerShell terminal, IT WORKS THERE. :/ and continues to fail in the initial terminal.
I'm trying to understand why this is so any assistance would be greatly appreciated. I'd like to avoid writing in a reboot once script.
Thanks,
Dan
Existing Powershell session isn't aware about Sql's modules that were just installed. Take a look at environment variable $env:PSModulePath. Compare new shell's variable to existing and you should see a missing path like ...\Microsoft SQL Server\110\Tools\PowerShell\Modules\.
For a work-around, modify the path to include module dir. Like so,
$env:PSModulePath += ";c:\some\path\to\sql"

MSBuild.exe (return code was -1066598274)

NAnt build script fails with this message
External Program Failed: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe (return code was -1066598274)
What can this mean?
The SVN "getting" sometimes get out of whack.
Reboot.
If that doesn't work:
Login as the identity that is causing the issue above.
Issue a svn.exe list command (or anything, but 'list' is the easiest) and make sure you have the certificate downloaded correctly. (as in, from the command line)
Basically, do some basic stuff to correct the svn "getting".