About the plug-in of the. net Core Project released on Linux,. netcore

Source: Internet
Author: User

About the plug-in of the. net Core Project released on Linux,. netcore
This article mainly records the issues that the. net Core project encountered when it was released on a Linux server to prevent forgetting

1. the following error is prompted when dotnet xxxxxx. dll is executed in the published file:

An assembly specified in the application dependencies manifest (xxx. deps. json) was not found:
Package: 'swashbuckle. AspNetCore. Swagger ', version: '1. 0.0'
Path: 'lib/netstandard1.6/Swashbuckle. AspNetCore. Swagger. dll'

 

Solution:

At first, I was able to normally release and modify the project (A compressed file) on Linux, but once again I commissioned my colleague's computer to release the update and found that the project could not be released (B compressed file ). According to the prompts, I checked xxx. deps. json in the and B release packages.

It is found that some sdk versions are different. Some SDK versions in B are 2.0.3 .. Then, in Linux, dotnet -- version found that the current dotnet sdk version is 2.0.0, updated to 2.0.3 (or above) and the program can be released normally.

 

2. Unable to read local files

Solution: change the reference addresses of all files to relative addresses. (Do not use an absolute address)

There is a supplement to this question. The menu in the project is generated based on reading a local dataClient. json file. Then it can be read normally in windows. It cannot be read when published to Linux. After checking, the file name read by the program is called "dataClient. Json ". The file suffix is case-insensitive, but can be correctly read in windows, so Linux cannot read the file correctly.

 

 

 

Other subsequent supplements ......

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.