logo
down
shadow

How to distribute a .net core 2.0 console application on osx


How to distribute a .net core 2.0 console application on osx

Content Index :

How to distribute a .net core 2.0 console application on osx
Tag : macos , By : greggerz
Date : November 13 2020, 03:01 PM

wish help you to fix your issue You have the right intuition about the difference between build and publish.
dotnet build will build the application for local development. One aspect is that the build will assume all dependencies are available via local nuget cache.
dotnet publish -c Release --framework netcoreapp2.0
dotnet publish -c Release --framework netcoreapp2.0 --runtime osx-x64

Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

docker container exits immediately even with Console.ReadLine() in a .net core console application


Tag : chash , By : akr
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , You should either run your container in the Interactive mode (with -i option). but please note that the background processes will be closed immediately when you run the container so make sure your script is run in the foreground or it simply won't work.

Interactive, Selectable and scrollable Items in Console Application in .NET Core like Yeoman console


Tag : chash , By : abuiles
Date : March 29 2020, 07:55 AM
it fixes the issue They key parts of the solution are:
You can use Console.ReadKey() to detect pressing of arrow keys You can use Console.CursorTop to read and write the current cursor position
int optionsCount = 5;

int selected = 0;

bool done = false;

while (!done)
{
    for (int i = 0; i < optionsCount; i++)
    {
        if (selected == i)
        {
            Console.ForegroundColor = ConsoleColor.Cyan;
            Console.Write("> ");
        }
        else
        {
            Console.Write("  ");
        }

        Console.WriteLine(i);

        Console.ResetColor();
    }

    switch (Console.ReadKey(true).Key)
    {
        case ConsoleKey.UpArrow:
            selected = Math.Max(0, selected - 1);
            break;
        case ConsoleKey.DownArrow:
            selected = Math.Min(optionsCount - 1, selected + 1);
            break;
        case ConsoleKey.Enter:
            done = true;
            break;
    }

    if (!done)
        Console.CursorTop = Console.CursorTop - optionsCount;
}

Console.WriteLine($"Selected {selected}.");

How to distribute razor views to another application in .NET Core


Tag : development , By : Sumedh
Date : March 29 2020, 07:55 AM
hop of those help? You can create a normal netstandard1.6 library-i.e., where your controllers are, and embed the view resources into that dll in your csproj using the following:
  <ItemGroup>
    <EmbeddedResource Include="Views\**\*.cshtml" />
  </ItemGroup>
// Add views provided in this assembly.     
services.Configure<RazorViewEngineOptions>(options =>
{
    options.FileProviders.Add(
        new EmbeddedFileProvider(typeof(ClassInLibrary).GetTypeInfo().Assembly));
});

Connect to Core MVC application data context from Core console application


Tag : chash , By : rhyhann
Date : March 29 2020, 07:55 AM
I wish did fix the issue. That's because MVC Core is configuring the dependency injection properly, as opposite to the console application.
In your console application, you may instantiate your DbContext manually using this:
var builder = new ConfigurationBuilder()
              .SetBasePath(Directory.GetCurrentDirectory())
              .AddJsonFile("appsettings.json");

var configuration = builder.Build();
var optionsBuilder = new DbContextOptionsBuilder<SystemDataContext>();
optionsBuilder.UseSqlServer(configuration.GetConnection("DefaultConnection"));
var db = new SystemDataContext(optionsBuilder.Options);

Is it possible to run .NET Core console application silently (hide console window)?


Tag : chash , By : Lucyberad
Date : March 29 2020, 07:55 AM
Related Posts Related QUESTIONS :
  • Shipping GTK+ apps for macOS with Xcode
  • Is notarization necessary for Mac App store release?
  • Tutorial for Quick Look Generator not associated with .app
  • What are some good Mercurial GUI clients for OS X?
  • Where do I put mxmlc so that I could just type 'mxmlc' in the terminal to compile a swf file?
  • macos with vscode ctrl+f2 does not work on macos as expected
  • Are Swift's embedded dylibs still required in macOS apps?
  • Tell iPadOS from macOS on the web
  • Perl Syntax Error on Compilation - "use" not allowed in expression
  • Where does "npm install -g <package>" install the package?
  • Is Pinch Zoom(zooming like we do on image) available in Firefox Developer Edition for macOS? If yes, how to enable it?
  • Homebrew installation in mac is giving error
  • Install CLSQL on Mac OS X
  • TextMate - must-have Bundles and Plugins for web dev
  • Where is ~/.config/MonoDevelop/ for MonoDevelop
  • OS X Dock API? Retrieve OS X active application's icon with badges and other modifications
  • Trying to build the LEVMAR math library on a mac using the Accelerate Framework
  • Do GLSL geometry shaders work on the GMA X3100 under OSX
  • clear command in my mac os terminal gives the following error
  • how to get the path of a localized plist under mac os x
  • Is there a way to trigger gesture events on Mac OS X?
  • XAMPP default folder on OSX
  • Qt4: QMenuBar/QMenu doesn't show up on Mac OS X
  • How do you dynamically allocate memory in Mac OS X assembly?
  • Bluetooth proximity hooks on OS X. How? (i.e., automatically lock screen if I move away)
  • How can I create a temp file with a specific extension in bash?
  • How to fix intellij keymap to old keymap after 2019 update Mac OS?
  • VSCode monospace fonts are not monospaced, how to fix this?
  • Unable to install React Native cli on Mac using npm
  • Does go-get run builds forked from current shell process with different environment variables?
  • Is there a way to set the output of an AppleScript to a certain color, and change depending on conditions?
  • Why is this functionKey selected when I press F1, F2, etc?
  • Is there a way to replace the native maximize button on the main window with fullscreen button?
  • Resizing Docker disk image to a non-standard size
  • How to batch "touch" files in subfolder with data from parent folder
  • How can I bypass an index error or have the script run again?
  • What is the first variables of my stack program?
  • Jenkins through docker: How to configure own host as agent for jenkins?
  • Is there a way to determine the size of a docker volume on my macOS machine?
  • How do I return the output of my Apple Script to the Status Bar in macOS?
  • Gitlab Client in Login Redirect Loop
  • launchd: Confusion on the sematics of bootstrap/bootout for controlling services on macOS
  • How to unminimize a minimized window (apple script not working with upgrade from Capitan to Mojave)
  • How to add LoginItems since macOS 10.11 when LSSharedFileListInsertItemURL is deprecated?
  • Cannot mount a volume without using sudo
  • Trouble displaying stl file in SceneKit with macOS
  • Using Unicast RTSP URIs via ffmpeg
  • How to copy intl.so to /usr/lib/php/extensions
  • Macbook crontab: "Service cannot load in requested session"
  • Is it possible to build Electron Apps on Mac Pro? Doesn't seem like it due to Bizarre GPU issue
  • IntelliJ IDEA can't open projects or add SDK on macOS Catalina
  • OpenMPI on MacOS: Unexpected IP
  • The requested version of macOS is not available. HOW TO FIX IT TUTORIAL. macOS Catalina public beta
  • Mac Terminal: Looping & ImageMagick
  • SwiftUI scroll view partially displays last item in Mac app
  • AFP and Time Machine stopped working on QNAP HS-251+
  • How to add an application shortcut in dock on mac machine?
  • macOS: What's the correct place to install a dylib on a user's system?
  • Apache ERR_CONNECTION_REFUSED on Mac OS X Sierra 10.12
  • How to reconnect to lost VNC server on mac
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com