I need help with my TFS 2015, I able to run build and publish in Visual Studio 2015 and when I create a build it in TFS 2015, my jquery is not completely built.
my setup in Command Line
Tool : C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm\bower.cmd
Arguments : install jquery
Build log
Everything works fine except the jquery only a few files and folders were created compared to build from in VS 2015.
Please let me know where I did wrongly.
Try the solution in this case ECONFLICT Unable to find suitable version for jquery Foundation:
Use resolutions in your bower.json file. For example:
{
"name": "refactor",
"private": true,
"dependencies": {
"jquery": "~1.11.1",
"raphael": "1.3.x",
"font-awesome": "~4.3.0",
"foundation": "x"
},
"resolutions": {
"jquery": "~1.11.1"
}
}
This will force bower to use that specific version of jQuery.
Related
When I try to build my Nuxt.js project for production, I get this error:
Error: Path variable [contenthash:7] not implemented in this context: fonts/[contenthash:7].eot
at fn (/home/mike/job/daily-fashion/node_modules/#nuxt/webpack/node_modules/webpack/lib/TemplatedPathPlugin.js:45:11)
Googling the issue, I found this conversation, in which it's suggested to downgrade Webpack to 4.28 to solve the issue. The problem is, I don't see how to downgrade, given it's an internal dependency of Nuxt.js.
I'm using nuxt#2.11.0. This is how its dependencies appear in package-lock.json:
"#nuxt/webpack": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/#nuxt/webpack/-/webpack-2.11.0.tgz",
"integrity": "sha512/yaT2lonYOQYUrsg==",
"requires": {
....
"webpack": "^4.41.3",
...
},
Any suggestion how to make Nuxt.js used an older version of webpack? Thanks!
For me working this solution in package.json
"nuxt": "2.3.4",
Environment: Ubuntu 16.04, .NET Core SDK Preview 2.0.0 (006497), VSC 1.14.2
Things used to work fine under .net core 1. Now, I have upgraded my system to .net core 2.
From the command line, I created a new project and ran it:
$ dotnet new mvc
$ dotnet run
The webpage works as expected.
Now, I open the folder in VSC and tried to debug the app. First time, VCS helps create launch.json and tasks.json. Here is my tasks.json contents:
"version": "2.0.0",
"tasks": [
{
"taskName": "build",
"command": "dotnet",
"type": "shell",
"group": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
}
]
}
In the terminal view, I see that VCS tries to run the build command as dotnet <. This throws an error that preLaunchTask "build" exited with error code 129.
I tried to fix this by adding args: ["build"] to the task. This seems to fix the build but I now get another error about launch.json not being configured properly.
Wondering if there is some step that I simply missed. Regards.
The answer was provided by mvermef in his comment. I am just adding a new post here so I can mark it as an answer.
The problems with VSC are explained at https://github.com/dotnet/core/blob/master/release-notes/2.0/2.0.0-preview2-known-issues.md. The most important thing is that you remove your existing C# extension and replace it with the latest beta version. Now, if you create a new project from the command line and load it in VSC, you should be able to debug it.
I have created a new ASP.NET Core Web API project and then run the au new --here command selecting option 2 (ASP.NET Core Project) to create a starting point for a web application.
Next I updated the Startup.cs file to serve static files.
app.UseDefaultFiles();
app.UseStaticFiles();
app.UseFileServer();
Finally I updated the aurelia.json file to build into the wwwroot folder.
"platform": {
"id": "aspnetcore",
"displayName": "ASP.NET Core",
"output": "wwwroot/scripts",
"index": "wwwroot/index.html",
"baseUrl": "scripts"
},
"build": {
"targets": [
{
"id": "aspnetcore",
"displayName": "ASP.NET Core",
"output": "wwwroot/scripts",
"index": "wwwroot/index.html",
"baseUrl": "scripts"
}
],
The Aurelia CLI will run the build option (au build) and the run option (au run) fine and it will serve up the site on http://localhost:9000. But I get only the following HTML served up:
<html><head></head><body>CannotGET /</body></html>
or if trying to reference http://localhost:9000/index.html
<html><head></head><body>CannotGET /index.html</body></html>
If I run the application through Visual Studio and IIS Express it works fine.
What am I missing to get au run to work?
I have the same result with ASP.NET Core 1.0, 1.1 and in Visual Studio 2015 and Visual Studio 2017. If I use au new without the --here and no ASP.NET Core integration au run will work just fine.
I found the answer buried in an issue on GitHub: https://github.com/aurelia/cli/issues/405
The run.js file need to also have the path updated.
baseDir: ['./wwwroot'],
I've spent two whole days trying to create an initial migration for the database of my project. This is so fustrating. Each preview version of the docs points towards different directions, and there're a lot of unclosed issues flying arround for a while.
My project is an AspNetCore application running on the full framework (net462) although I think I've tryed every combination of preview versions, even the workarounds proposed on this issue: EF Tools 1.1.0-preview4 Unrecognized option '--config' or in this one: https://github.com/aspnet/EntityFramework/issues/7083 but neither work.
This is an abstract of my project.json with the relevant parts:
{
"version": "1.0.0-*",
"buildOptions": {
"platform": "x86",
"debugType": "full",
"preserveCompilationContext": true,
"emitEntryPoint": true
},
"dependencies": {
....
"Microsoft.EntityFrameworkCore": "1.1.0",
"Microsoft.EntityFrameworkCore.Design": "1.1.0",
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
"Microsoft.EntityFrameworkCore.SqlServer.Design": "1.1.0",
....
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final",
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final"
},
"frameworks": {
"net462": {
}
},
...
}
In my case the proposed workarounds don't work, neither using the nightly builds nor downgrading the tools to 1.0.0-preview3.
If I use the 1.1.0-preview4-final version of the tools I hit this error:
Unrecognized option --config
If I use the nightly builds I get this one, wich is somehow absurd, as my app has only one project and is not a dll (it has also emitEntryPoint:true set)
Could not load assembly 'Sales'. Ensure it is referenced by the startup project 'Sales'
But this is my favourite one, when I downgrade to the 1.0.0-preview3-final of the tools I get this surrealistic one:
error: Package Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.0-preview3-final is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.0-preview3-final supports: netcoreapp1.0 (.NETCoreApp,Version=v1.0)
I had to read it five times to get sure that in the second sentence was telling just the opposite of the first one... It seems a joke!
Furthermore, commands are not working on the PMC anymore, no matter wich version of the tools I install, no matter if I restore the packages and if I restart the computer...
I'm getting crazy with so many versions of everything and I only want to create a migration, it doesn't matter wich version of the tools I have to use... Is there a valid configuration nowadays or am I trying something imposible?
Has anybody been able to create migrations within an asp.net core application targeting the full .net framework (net462) with ANY version of the ef tooling?
If so, HOW?
EDIT:
After targeting the project to .netcoreapp1.0 and removing the incompatible references now I hit this error:
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App\1.0.1'
What's happening here??? I'm really tired of .net Core, and it's still in it's first version. I've suffered a lot of issues like this while it was in beta, but now things are supposed to be stable... They have changed twenty times everything that can be changed, APIs, assembly names, namespaces, package names, conventions... Now let's wait for the preview5, 6 or 25 of the tooling and maybe by the year 2035 EF Core will have appropiate tools and procedures, meanwhile I damn a million time my decission of betting for this technology!
EDIT 2:
As per comments global.json may be relevant:
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-1-003177"
}
}
and to add that the 1.0.0-preview2-1-003177 folder exists and is the only one in C:\Program Files (x86)\dotnet\sdk\ and C:\Program Files\dotnet\sdk\
I hate to answer my own question, but I suppose that not too much people will go into this alley... So for those who are struggling with a similar problem I'll tell that mine came from this configuration on project.json:
...
"buildOptions": {
"platform": "x86", <- THIS!!!
"debugType": "portable",
"preserveCompilationContext": true,
"emitEntryPoint": true
},
after removing the "platform" key, migrations started to work again...
I'm not really sure when did I introduced that setting, since I didn't try to create migrations before upgrading to the version 1.1 of the .NET Core SDK. Maybe it was copied from one of the examples on internet, maybe it was from a previous version, I don't know, but that has turned me crazy for days, I hope it helps somebody outthere.
I'm trying to include Bootstrap in my Aurelia CLI project, and the CSS and JS work fine.
The only problem I have is the glyphicons require font files to be loaded.
I use this configuration:
"dependencies": [
{
"name": "bootstrap",
"path": "../node_modules/bootstrap/dist",
"main": "js/bootstrap.min",
"deps": ["jquery"],
"exports": "$",
"resources": [
"css/bootstrap.min.css",
"fonts/glyphicons-halflings-regular.woff2"
]
}
]
But I get an error containing this line:
path: 'C:\Users\randy\Documents\form\node_modules\bootstrap\dist\fonts\glyphicons-halflings-regular.js'
So even though I include the .woff2 file, Aurelia tries to import the file as a JS file. What can I do to make this work? CSS does work fine.
It looks like this is a bug in the current version of the Aurelia CLI. I've submitted an issue for you here: https://github.com/aurelia/cli/issues/248
Aurelia can't process font files. You must use manual bundle task for it.
Here is similar solution for font-awesome: https://stackoverflow.com/a/39544587/1276632
Here is solution for glyphicons (I used it for bootstrap v4 integration): https://github.com/aurelia/cli/issues/248#issuecomment-250967074
This has been solved, for more information read the Github issue.
This issue can now be solved by adding a copy instruction in the aurelia.json.
aurelia.json - valid if the project was created by aurelia-cli 0.25.0 or greater
Add the following in the build block:
"bundles": [ ... ],
"copyFiles": {
"node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2": "bootstrap/fonts",
"node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff": "bootstrap/fonts",
"node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf": "bootstrap/fonts"
}
If the project was created by an older CLI version, you will have to create the copy task inside the tasks folder
https://github.com/aurelia/cli/blob/master/lib/resources/tasks/copy-files.js.
After that, call the copy task in the build.js/ts task
https://github.com/aurelia/cli/blob/master/lib/resources/tasks/build.js#L15
* credits to fabioluz for commenting this on github