There is a program file in the form:
[project] type=MyApp 1.0 project directory=D:\Папка проекта Еще какие-то значения.
When you open the file inside the program (File-> Open project) everything works fine. But there was a need to open this file with a double click. Using ClickOne, I created a file of associations.
Opening a project trying to do so:
private void MainForm_Load(object sender, EventArgs e) { string[] args = Environment.GetCommandLineArgs(); if (args.Length >= 2) { MessageBox.Show("Открыт проект! УРА!"); OpenProject(args[1]); } }
In Program.cs it is stated that the arguments are accepted:
public static void Main(string[] args)
How to solve this problem?