1
새 클래스 인스턴스를 만들 때 "System.Deployment.dll에서 System.Deployment.Application.InvalidDeploymentException '형식의 예외가 발생했습니다."잘못된 배포 예외
PrinterSettings^ MyPS = gcnew PrinterSettings();
모든 것이 잘 작동하고 내가 원하는 값을 얻을 :에
그것은 발생합니다.
Form1.cpp :
#include "stdafx.h"
#include "Form1.h"
#include "Print.h"
#include <iostream>
System::Void DPrint::Form1::Form1_Load(System::Object^ sender, System::EventArgs^ e)
{
PrinterSettings^ MyPS = gcnew PrinterSettings();
System::Windows::Forms::MessageBox::Show("From Class PrinterSettings: " + MyPS->IniFilePath());
}
Print.h :
#ifndef PRINT_H
#define PRINT_H
public ref class PrinterSettings
{
private:
System::String^ m_strPath;
public:
PrinterSettings()
{
m_strPath = System::Windows::Forms::Application::UserAppDataPath;
}
System::String^ IniFilePath() { return m_strPath; };
};
#endif
무슨 일이 일어나고 있는지 어떤 아이디어가? 고맙습니다.
나는 (배포 후) 미래에 알려질 가치를 얻으려고합니까? 내가 그 일과 아무 관련이 없다는 뜻인가? 고맙습니다. 편집 : 이것이 디버그 문제임을 이해합니다. – Nikonation
@Nikonation 첫 번째 기회 예외 일 경우 사용자에게 표시되지 않습니다. 다른 문제가 없다고 가정하면 문제가되지 않습니다. – akton
정말 고마워요! – Nikonation