डिफ़ॉल्ट रूप से, ऐड-प्रवास आदेश रूटक्या ईएफ माइग्रेशन "माइग्रेशन" फ़ोल्डर का स्थान बदलना संभव है?
- परियोजना में प्रवास .cs फ़ाइल बनाने के लिए प्रयास
- माइग्रेशन
मैं साथ मेरी माइग्रेशन संग्रह करना चाहते हैं मेरे प्रोजेक्ट के \ डेटा फ़ोल्डर में मेरे बाकी ईएफ-संबंधित कोड के साथ:
- परियोजना रूट
- डाटा
- माइग्रेशन
- डाटा
PM> add-migration Migration1
साथ
:
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\MyProjectRoot\Migrations\201112171635110_Migration1.cs'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamWriter.CreateFile(String path, Boolean append) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding) at System.IO.File.WriteAllText(String path, String contents)
क्या डिस्क पर स्थान निर्दिष्ट करना संभव है कि माइग्रेशन फ़ाइल को एड-माइग्रेशन कमांड निष्पादित करते समय बनाया जाना चाहिए?
this.MigrationsDirectory = "DirOne\\DirTwo";
नाम स्थान विन्यास वर्ग के ही नाम स्थान के रूप में स्थापित किया जाता रहेगा:
कृपया रोजर के समाधान को उत्तर के रूप में चिह्नित करें। यह मेरे लिए काम किया। धन्यवाद। – jordanbtucker